gg.easy.airship 0.1.2136 → 0.1.2138
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Editor/Artifacts/AirshipLocalArtifactDatabase.cs +5 -1
- package/Editor/Artifacts/AirshipPrefabUtility.cs +9 -10
- package/Editor/TypescriptServices/Compiler/TypescriptCompilationService.cs +27 -3
- package/Editor/TypescriptServices/TypescriptServices.cs +1 -1
- package/Runtime/Code/Authentication/EasyAuthenticator.cs +5 -2
- package/Runtime/Code/Authentication/TransferData.cs +1 -0
- package/Runtime/Code/Luau/AirshipScript.cs +2 -0
- package/Runtime/Code/Luau/BinaryBlob.cs +4 -258
- package/Runtime/Code/LuauAPI/Bridge.cs +4 -0
- package/Runtime/Code/LuauAPI/ResourcesAPI.cs +1 -1
- package/Runtime/Code/Network/AirshipNetworkManager.cs +0 -2
- package/Runtime/Code/{RemoteConsole → Network}/ServerConsole.cs +159 -154
- package/Runtime/Code/{RemoteConsole → Network}/ServerConsole.cs.meta +2 -2
- package/Runtime/Code/Network/Simulation/AirshipSimulationManager.cs +13 -15
- package/Runtime/Code/Network/StateSystem/AirshipNetworkedStateManager.cs +11 -15
- package/Runtime/Code/Player/Character/MovementSystems/Character/CharacterMovement.cs +153 -16
- package/Runtime/Code/Player/Character/MovementSystems/Character/Structures/CharacterSnapshotData.cs +88 -19
- package/Runtime/Code/Player/PlayerInfo.cs +6 -2
- package/Runtime/Code/Player/PlayerManagerBridge.cs +3 -3
- package/Runtime/Code/Player/UserData.cs +1 -0
- package/Runtime/Code/TSCodeGen/TypeGenerator.cs +2 -1
- package/Runtime/Code/VoxelWorld/Airship.VoxelWorld.asmdef +2 -1
- package/Runtime/Code/VoxelWorld/VoxelCompressUtil.cs +26 -3
- package/Runtime/Code/VoxelWorld/VoxelWorld.cs +0 -17
- package/Runtime/Code/VoxelWorld/VoxelWorldChunk.cs +1 -1
- package/Runtime/Code/VoxelWorld/WorldSaveFile.cs +8 -6
- package/Runtime/Code/Zstd/Zstd.cs +125 -47
- package/Runtime/Code/Zstd/ZstdCompressStream.cs +147 -0
- package/Runtime/Code/Zstd/ZstdCompressStream.cs.meta +3 -0
- package/Runtime/Code/Zstd/ZstdDecompressStream.cs +196 -0
- package/Runtime/Code/Zstd/ZstdDecompressStream.cs.meta +3 -0
- package/Runtime/Code/Zstd/ZstdNative.cs +5 -5
- package/Runtime/Plugins/Android/libLuauPlugin.so +0 -0
- package/Runtime/Plugins/Linux/libLuauPlugin.so +0 -0
- package/Runtime/Plugins/Mac/LuauPlugin.bundle/Contents/Info.plist +1 -1
- package/Runtime/Plugins/Mac/LuauPlugin.bundle/Contents/MacOS/LuauPlugin +0 -0
- package/Runtime/Plugins/Windows/x64/LuauPlugin.dll +0 -0
- package/Runtime/Plugins/Windows/x64/LuauPlugin.pdb +0 -0
- package/Runtime/Plugins/iOS/LuauPluginIos.a +0 -0
- package/package.json +1 -1
- package/Runtime/Code/RemoteConsole/Airship.RemoteConsole.asmdef +0 -26
- package/Runtime/Code/RemoteConsole/Airship.RemoteConsole.asmdef.meta +0 -3
- package/Runtime/Code/RemoteConsole.meta +0 -3
|
@@ -150,7 +150,11 @@ namespace Airship.Editor {
|
|
|
150
150
|
/// Will try to get the script asset data associated with the specified script (if applicable)
|
|
151
151
|
/// </summary>
|
|
152
152
|
internal bool TryGetScriptAssetData(AirshipScript script, out ComponentScriptAssetData assetData) {
|
|
153
|
-
|
|
153
|
+
return TryGetScriptAssetDataFromPath(script.assetPath, out assetData);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
internal bool TryGetScriptAssetDataFromPath(string path, out ComponentScriptAssetData assetData) {
|
|
157
|
+
var item = scripts.FirstOrDefault(f => f.script == path);
|
|
154
158
|
if (item != null) {
|
|
155
159
|
assetData = item;
|
|
156
160
|
return true;
|
|
@@ -6,30 +6,29 @@ namespace Airship.Editor {
|
|
|
6
6
|
internal static class AirshipPrefabUtility {
|
|
7
7
|
internal static bool FindReconcilablePrefabComponent(AirshipComponent component, out AirshipComponent prefabComponent) {
|
|
8
8
|
var isPrefab = PrefabUtility.IsPartOfAnyPrefab(component);
|
|
9
|
-
prefabComponent = PrefabUtility.GetCorrespondingObjectFromOriginalSource(component);
|
|
10
|
-
|
|
11
9
|
if (!isPrefab) {
|
|
12
10
|
prefabComponent = null;
|
|
13
11
|
return false;
|
|
14
12
|
}
|
|
15
13
|
|
|
16
|
-
|
|
17
|
-
prefabComponent = null;
|
|
18
|
-
return false;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
var networkIdentity = prefabComponent.gameObject.GetComponentInParent<NetworkIdentity>();
|
|
14
|
+
var networkIdentity = component.gameObject.GetComponentInParent<NetworkIdentity>();
|
|
22
15
|
if (networkIdentity != null) {
|
|
23
16
|
prefabComponent = null;
|
|
24
17
|
return false;
|
|
25
18
|
}
|
|
26
19
|
|
|
27
|
-
var meshFilter =
|
|
20
|
+
var meshFilter = component.GetComponentsInChildren<MeshFilter>(); // because of 'SendMessage' we can't force reconcile these
|
|
28
21
|
if (meshFilter.Length > 0) {
|
|
29
22
|
prefabComponent = null;
|
|
30
23
|
return false;
|
|
31
24
|
}
|
|
32
|
-
|
|
25
|
+
|
|
26
|
+
prefabComponent = PrefabUtility.GetCorrespondingObjectFromOriginalSource(component);
|
|
27
|
+
if (prefabComponent.script == null) {
|
|
28
|
+
prefabComponent = null;
|
|
29
|
+
return false;
|
|
30
|
+
}
|
|
31
|
+
|
|
33
32
|
return true;
|
|
34
33
|
}
|
|
35
34
|
}
|
|
@@ -225,18 +225,42 @@ using Object = UnityEngine.Object;
|
|
|
225
225
|
return;
|
|
226
226
|
}
|
|
227
227
|
|
|
228
|
+
var artifacts = AirshipLocalArtifactDatabase.instance;
|
|
229
|
+
var modifiedDatabase = false;
|
|
230
|
+
|
|
228
231
|
try {
|
|
229
232
|
AssetDatabase.StartAssetEditing();
|
|
230
233
|
var compileFileList = CompiledFileQueue.ToArray();
|
|
234
|
+
|
|
231
235
|
foreach (var file in compileFileList) {
|
|
232
|
-
|
|
233
|
-
|
|
236
|
+
var outFileHash = TypescriptProjectsService.Project.GetOutputFileHash(file);
|
|
237
|
+
|
|
238
|
+
if (artifacts.TryGetScriptAssetDataFromPath(PosixPath.ToPosix(file), out var data)) {
|
|
239
|
+
if (outFileHash != data.metadata.compiledHash) {
|
|
240
|
+
AssetDatabase.ImportAsset(file, ImportAssetOptions.Default);
|
|
241
|
+
data.metadata.compiledHash = outFileHash;
|
|
242
|
+
modifiedDatabase = true;
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
else {
|
|
246
|
+
var scriptData = artifacts.GetOrCreateScriptAssetData(AssetDatabase.LoadAssetAtPath<AirshipScript>(file));
|
|
247
|
+
scriptData.metadata = new TypescriptCompilerMetadata() {
|
|
248
|
+
compiledHash = outFileHash
|
|
249
|
+
};
|
|
250
|
+
|
|
251
|
+
AssetDatabase.ImportAsset(file, ImportAssetOptions.Default);
|
|
252
|
+
modifiedDatabase = true;
|
|
253
|
+
}
|
|
234
254
|
}
|
|
255
|
+
|
|
235
256
|
AssetDatabase.Refresh();
|
|
236
257
|
} catch (Exception ex) {
|
|
237
|
-
Debug.
|
|
258
|
+
Debug.LogException(ex);
|
|
238
259
|
} finally {
|
|
239
260
|
AssetDatabase.StopAssetEditing();
|
|
261
|
+
if (modifiedDatabase) {
|
|
262
|
+
artifacts.Modify();
|
|
263
|
+
}
|
|
240
264
|
}
|
|
241
265
|
|
|
242
266
|
EditorApplication.update -= ReimportCompiledFiles;
|
|
@@ -65,7 +65,7 @@ namespace Airship.Editor {
|
|
|
65
65
|
return;
|
|
66
66
|
#endif
|
|
67
67
|
// On project load we'll force a full compile to try and get all the refs up to date
|
|
68
|
-
if (!SessionState.GetBool("TypescriptInitialBoot", false)) {
|
|
68
|
+
if (!SessionState.GetBool("TypescriptInitialBoot", false) && IsValidEditor) {
|
|
69
69
|
SessionState.SetBool("TypescriptInitialBoot", true);
|
|
70
70
|
TypescriptCompilationService.BuildTypescript(TypeScriptCompileFlags.FullClean | TypeScriptCompileFlags.Setup | TypeScriptCompileFlags.DisplayProgressBar);
|
|
71
71
|
}
|
|
@@ -174,14 +174,16 @@ namespace Code.Authentication {
|
|
|
174
174
|
tcs.SetResult(new UserData() {
|
|
175
175
|
uid = InternalHttpManager.editorUserId,
|
|
176
176
|
username = loginMessage.editorUsername,
|
|
177
|
-
|
|
177
|
+
orgRoleName = "Dev",
|
|
178
|
+
profileImageId = loginMessage.editorProfileImageId,
|
|
178
179
|
});
|
|
179
180
|
return await tcs.Task;
|
|
180
181
|
}
|
|
181
182
|
tcs.SetResult(new UserData() {
|
|
182
183
|
uid = this.connectionCounter + "",
|
|
183
184
|
username = "Player" + this.connectionCounter,
|
|
184
|
-
|
|
185
|
+
orgRoleName = "Dev",
|
|
186
|
+
profileImageId = string.Empty,
|
|
185
187
|
fullTransferPacket = "{}"
|
|
186
188
|
});
|
|
187
189
|
return await tcs.Task;
|
|
@@ -210,6 +212,7 @@ namespace Code.Authentication {
|
|
|
210
212
|
uid = transferData.user.uid,
|
|
211
213
|
username = transferData.user.username,
|
|
212
214
|
profileImageId = transferData.user.profileImageId,
|
|
215
|
+
orgRoleName = transferData.user.orgRoleName,
|
|
213
216
|
fullTransferPacket = fullTransferPacket
|
|
214
217
|
});
|
|
215
218
|
}).Catch((err) => {
|
|
@@ -16,270 +16,16 @@ namespace Assets.Luau {
|
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
public BinaryBlob(byte[] bytes) {
|
|
19
|
+
if (bytes.Length > uint.MaxValue) {
|
|
20
|
+
throw new Exception("Length of binary blob data exceeds " + int.MaxValue + " bytes.");
|
|
21
|
+
}
|
|
19
22
|
dataSize = bytes.Length;
|
|
20
23
|
data = bytes;
|
|
21
24
|
}
|
|
22
25
|
|
|
23
|
-
public
|
|
26
|
+
public int dataSize;
|
|
24
27
|
public byte[] data;
|
|
25
28
|
|
|
26
|
-
private Dictionary<object, object> m_cachedDictionary = null;
|
|
27
|
-
|
|
28
|
-
public Dictionary<object, object> GetDictionary() {
|
|
29
|
-
if (m_cachedDictionary != null) {
|
|
30
|
-
return m_cachedDictionary;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
var readPos = 1; // skip the first byte, it's a magic key to let us know it's a blob
|
|
34
|
-
m_cachedDictionary = Decode(data, ref readPos);
|
|
35
|
-
|
|
36
|
-
return m_cachedDictionary;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
enum keyTypes : byte {
|
|
40
|
-
KEY_TERMINATOR = 0,
|
|
41
|
-
KEY_TABLE = 1,
|
|
42
|
-
KEY_BYTENUMBER = 2,
|
|
43
|
-
KEY_SHORTNUMBER = 3,
|
|
44
|
-
KEY_INTNUMBER = 4,
|
|
45
|
-
KEY_FLOATNUMBER = 5,
|
|
46
|
-
KEY_DOUBLENUMBER = 6,
|
|
47
|
-
KEY_SHORTSTRING = 7,
|
|
48
|
-
KEY_LONGSTRING = 8,
|
|
49
|
-
KEY_VECTOR3 = 9,
|
|
50
|
-
KEY_BOOLEANTRUE = 10,
|
|
51
|
-
KEY_BOOLEANFALSE = 11,
|
|
52
|
-
KEY_PODTYPE = 12,
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
private static Dictionary<object, object> Decode(byte[] bufferRaw, ref int readPos) {
|
|
56
|
-
var isCompressed = bufferRaw.Length > 0 && bufferRaw[0] == 1;
|
|
57
|
-
|
|
58
|
-
// Skip the first byte, which is the compressed/decompressed flag:
|
|
59
|
-
var bufferMaybeCompressed = new ArraySegment<byte>(bufferRaw).Slice(1, bufferRaw.Length - 1);
|
|
60
|
-
|
|
61
|
-
// Decompress the buffer if needed:
|
|
62
|
-
var buffer = isCompressed ? Zstd.DecompressData(bufferMaybeCompressed.Array) : bufferMaybeCompressed.Array;
|
|
63
|
-
|
|
64
|
-
Dictionary<object, object> dictionary = new();
|
|
65
|
-
|
|
66
|
-
while (true) {
|
|
67
|
-
byte keyType = readByte(buffer, ref readPos);
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
if (keyType == (byte)keyTypes.KEY_TERMINATOR) {
|
|
71
|
-
//All done
|
|
72
|
-
return dictionary;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
object key = null;
|
|
76
|
-
object value = null;
|
|
77
|
-
|
|
78
|
-
//All the supported key types ONLY
|
|
79
|
-
switch ((keyTypes)keyType) {
|
|
80
|
-
case keyTypes.KEY_SHORTSTRING: {
|
|
81
|
-
key = decodeShortStringToLua(buffer, ref readPos);
|
|
82
|
-
break;
|
|
83
|
-
}
|
|
84
|
-
case keyTypes.KEY_LONGSTRING: {
|
|
85
|
-
key = decodeLongStringToLua(buffer, ref readPos);
|
|
86
|
-
break;
|
|
87
|
-
}
|
|
88
|
-
case keyTypes.KEY_BYTENUMBER: {
|
|
89
|
-
key = readByte(buffer, ref readPos);
|
|
90
|
-
break;
|
|
91
|
-
}
|
|
92
|
-
case keyTypes.KEY_SHORTNUMBER: {
|
|
93
|
-
key = readShort(buffer, ref readPos);
|
|
94
|
-
break;
|
|
95
|
-
}
|
|
96
|
-
case keyTypes.KEY_INTNUMBER: {
|
|
97
|
-
key = readInt(buffer, ref readPos);
|
|
98
|
-
break;
|
|
99
|
-
}
|
|
100
|
-
case keyTypes.KEY_FLOATNUMBER: {
|
|
101
|
-
key = readFloat(buffer, ref readPos);
|
|
102
|
-
break;
|
|
103
|
-
}
|
|
104
|
-
case keyTypes.KEY_DOUBLENUMBER: {
|
|
105
|
-
key = readDouble(buffer, ref readPos);
|
|
106
|
-
break;
|
|
107
|
-
}
|
|
108
|
-
case keyTypes.KEY_VECTOR3: {
|
|
109
|
-
key = readVector3(buffer, ref readPos);
|
|
110
|
-
break;
|
|
111
|
-
}
|
|
112
|
-
default: {
|
|
113
|
-
Debug.LogError("[AirshipNet] Format problem decoding buffer - unknown key type. keyType=" + keyType);
|
|
114
|
-
return null;
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
byte valueType = readByte(buffer, ref readPos);
|
|
119
|
-
//All the value types
|
|
120
|
-
switch ((keyTypes)valueType) {
|
|
121
|
-
case keyTypes.KEY_SHORTSTRING: {
|
|
122
|
-
value = decodeShortStringToLua(buffer, ref readPos);
|
|
123
|
-
break;
|
|
124
|
-
}
|
|
125
|
-
case keyTypes.KEY_LONGSTRING: {
|
|
126
|
-
value = decodeLongStringToLua(buffer, ref readPos);
|
|
127
|
-
break;
|
|
128
|
-
}
|
|
129
|
-
case keyTypes.KEY_BYTENUMBER: {
|
|
130
|
-
value = readByte(buffer, ref readPos);
|
|
131
|
-
break;
|
|
132
|
-
}
|
|
133
|
-
case keyTypes.KEY_SHORTNUMBER: {
|
|
134
|
-
value = readShort(buffer, ref readPos);
|
|
135
|
-
break;
|
|
136
|
-
}
|
|
137
|
-
case keyTypes.KEY_INTNUMBER: {
|
|
138
|
-
value = readInt(buffer, ref readPos);
|
|
139
|
-
break;
|
|
140
|
-
}
|
|
141
|
-
case keyTypes.KEY_FLOATNUMBER: {
|
|
142
|
-
value = readFloat(buffer, ref readPos);
|
|
143
|
-
break;
|
|
144
|
-
}
|
|
145
|
-
case keyTypes.KEY_DOUBLENUMBER: {
|
|
146
|
-
value = readDouble(buffer, ref readPos);
|
|
147
|
-
break;
|
|
148
|
-
}
|
|
149
|
-
case keyTypes.KEY_VECTOR3: {
|
|
150
|
-
value = readVector3(buffer, ref readPos);
|
|
151
|
-
break;
|
|
152
|
-
}
|
|
153
|
-
case keyTypes.KEY_BOOLEANTRUE: {
|
|
154
|
-
value = true;
|
|
155
|
-
break;
|
|
156
|
-
}
|
|
157
|
-
case keyTypes.KEY_BOOLEANFALSE: {
|
|
158
|
-
value = false;
|
|
159
|
-
break;
|
|
160
|
-
}
|
|
161
|
-
case keyTypes.KEY_TABLE: {
|
|
162
|
-
value = Decode(buffer, ref readPos);
|
|
163
|
-
break;
|
|
164
|
-
}
|
|
165
|
-
case keyTypes.KEY_PODTYPE: {
|
|
166
|
-
value = readPodType(buffer, ref readPos);
|
|
167
|
-
break;
|
|
168
|
-
}
|
|
169
|
-
default: {
|
|
170
|
-
Debug.LogError("[AirshipNet] Format problem decoding buffer - unknown value type. valueType=" + valueType);
|
|
171
|
-
return null;
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
//store it
|
|
176
|
-
dictionary.Add(key, value);
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
//Read a byte
|
|
181
|
-
private static byte readByte(byte[] buffer, ref int readPos) {
|
|
182
|
-
byte value = buffer[readPos];
|
|
183
|
-
readPos += 1;
|
|
184
|
-
return value;
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
private static short readShort(byte[] buffer, ref int readPos) {
|
|
188
|
-
short value = BitConverter.ToInt16(buffer, readPos);
|
|
189
|
-
readPos += 2;
|
|
190
|
-
return value;
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
private static int readInt(byte[] buffer, ref int readPos) {
|
|
194
|
-
int value = BitConverter.ToInt32(buffer, readPos);
|
|
195
|
-
readPos += 4;
|
|
196
|
-
return value;
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
private static float readFloat(byte[] buffer, ref int readPos) {
|
|
200
|
-
float value = BitConverter.ToSingle(buffer, readPos);
|
|
201
|
-
readPos += 4;
|
|
202
|
-
return value;
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
private static double readDouble(byte[] buffer, ref int readPos) {
|
|
206
|
-
double value = BitConverter.ToDouble(buffer, readPos);
|
|
207
|
-
readPos += 8;
|
|
208
|
-
return value;
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
private static Vector3 readVector3(byte[] buffer, ref int readPos) {
|
|
212
|
-
Vector3 value = new();
|
|
213
|
-
value.x = readFloat(buffer, ref readPos);
|
|
214
|
-
value.y = readFloat(buffer, ref readPos);
|
|
215
|
-
value.z = readFloat(buffer, ref readPos);
|
|
216
|
-
return value;
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
private static object decodeShortStringToLua(byte[] buffer, ref int readPos) {
|
|
220
|
-
byte stringLength = readByte(buffer, ref readPos);
|
|
221
|
-
string value = Encoding.UTF8.GetString(buffer, readPos, stringLength);
|
|
222
|
-
readPos += stringLength;
|
|
223
|
-
return value;
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
private static object decodeLongStringToLua(byte[] buffer, ref int readPos) {
|
|
227
|
-
short stringLength = readShort(buffer, ref readPos);
|
|
228
|
-
string value = Encoding.UTF8.GetString(buffer, readPos, stringLength);
|
|
229
|
-
readPos += stringLength;
|
|
230
|
-
return value;
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
private static unsafe object readPodType(byte[] buffer, ref int readPos) {
|
|
234
|
-
int podType = readByte(buffer, ref readPos);
|
|
235
|
-
fixed (byte* pData = buffer) {
|
|
236
|
-
IntPtr data = (IntPtr)pData + readPos;
|
|
237
|
-
|
|
238
|
-
switch ((PODTYPE)podType) {
|
|
239
|
-
default: {
|
|
240
|
-
Debug.LogError("[AirshipNet] Unhandled pod type encountered during decode");
|
|
241
|
-
return null;
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
case PODTYPE.POD_RAY: {
|
|
245
|
-
readPos += LuauCore.RaySize();
|
|
246
|
-
return LuauCore.NewRayFromPointer(data);
|
|
247
|
-
}
|
|
248
|
-
case PODTYPE.POD_PLANE: {
|
|
249
|
-
readPos += LuauCore.PlaneSize();
|
|
250
|
-
return LuauCore.NewPlaneFromPointer(data);
|
|
251
|
-
}
|
|
252
|
-
case PODTYPE.POD_MATRIX: {
|
|
253
|
-
readPos += LuauCore.MatrixSize();
|
|
254
|
-
return LuauCore.NewMatrixFromPointer(data);
|
|
255
|
-
}
|
|
256
|
-
case PODTYPE.POD_QUATERNION: {
|
|
257
|
-
readPos += LuauCore.QuaternionSize();
|
|
258
|
-
return LuauCore.NewQuaternionFromPointer(data);
|
|
259
|
-
}
|
|
260
|
-
case PODTYPE.POD_VECTOR2: {
|
|
261
|
-
readPos = LuauCore.Vector2Size();
|
|
262
|
-
return LuauCore.NewVector2FromPointer(data);
|
|
263
|
-
}
|
|
264
|
-
case PODTYPE.POD_VECTOR4: {
|
|
265
|
-
readPos = LuauCore.Vector4Size();
|
|
266
|
-
return LuauCore.NewVector4FromPointer(data);
|
|
267
|
-
}
|
|
268
|
-
case PODTYPE.POD_COLOR: {
|
|
269
|
-
readPos += LuauCore.ColorSize();
|
|
270
|
-
return LuauCore.NewColorFromPointer(data);
|
|
271
|
-
}
|
|
272
|
-
case PODTYPE.POD_BINARYBLOB: {
|
|
273
|
-
int sizeOfBlob = readInt(buffer, ref readPos);
|
|
274
|
-
byte[] blobBuffer = new byte[sizeOfBlob + 4];
|
|
275
|
-
Marshal.Copy(data, blobBuffer, 0, sizeOfBlob + 4);
|
|
276
|
-
|
|
277
|
-
return new BinaryBlob(blobBuffer);
|
|
278
|
-
}
|
|
279
|
-
}
|
|
280
|
-
}
|
|
281
|
-
}
|
|
282
|
-
|
|
283
29
|
public bool Equals(BinaryBlob other) {
|
|
284
30
|
return this.dataSize == other?.dataSize;
|
|
285
31
|
}
|
|
@@ -448,6 +448,10 @@ public static class Bridge {
|
|
|
448
448
|
return scenes.ToArray();
|
|
449
449
|
}
|
|
450
450
|
|
|
451
|
+
public static void SetSkyboxMaterial(Material material) {
|
|
452
|
+
RenderSettings.skybox = material;
|
|
453
|
+
}
|
|
454
|
+
|
|
451
455
|
public static float[] MakeFloatArray(int size) {
|
|
452
456
|
return new float[size];
|
|
453
457
|
}
|