gg.easy.airship 0.1.2131 → 0.1.2133
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/CreateAssetBundles.cs +1 -1
- package/Editor/Packages/AirshipPackagesWindow.cs +5 -5
- package/Runtime/Code/CoreUI/Login/LoginApp.cs +11 -0
- package/Runtime/Code/Luau/ReflectionList.cs +3 -2
- package/Runtime/Code/Luau/TypeReflection.cs +2 -0
- package/Runtime/Code/LuauAPI/WheelColliderAPI.cs +33 -0
- package/Runtime/Code/LuauAPI/WheelColliderAPI.cs.meta +3 -0
- package/Runtime/Code/Network/Simulation/AirshipSimulationManager.cs +60 -13
- package/Runtime/Code/Player/Character/MovementSystems/Character/CharacterMovement.cs +65 -23
- package/Runtime/Code/TSCodeGen/TypeGenerator.cs +2 -1
- package/Runtime/Code/VoxelWorld/TexturePacker.cs +2 -7
- package/Runtime/Code/VoxelWorld/VoxelBlocks.cs +5 -5
- package/Runtime/Resources/Img/arrow-exit.png.meta +17 -14
- package/Runtime/Scenes/Login.unity +506 -336
- package/URP/AirshipURPAsset.asset +1 -1
- package/package.json +1 -1
|
@@ -386,7 +386,7 @@ public static class CreateAssetBundles {
|
|
|
386
386
|
PlayerSettings.SetUseDefaultGraphicsAPIs(buildTarget, false);
|
|
387
387
|
PlayerSettings.SetGraphicsAPIs(buildTarget, new GraphicsDeviceType[]
|
|
388
388
|
{
|
|
389
|
-
GraphicsDeviceType.
|
|
389
|
+
GraphicsDeviceType.Vulkan
|
|
390
390
|
});
|
|
391
391
|
} else {
|
|
392
392
|
PlayerSettings.SetUseDefaultGraphicsAPIs(buildTarget, true);
|
|
@@ -396,10 +396,10 @@ namespace Editor.Packages {
|
|
|
396
396
|
// Uncomment to just build iOS
|
|
397
397
|
if (isCoreMaterials) {
|
|
398
398
|
platforms.Clear();
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
platforms.Add(AirshipPlatform.Windows);
|
|
402
|
-
platforms.Add(AirshipPlatform.Mac);
|
|
399
|
+
// platforms.Add(AirshipPlatform.iOS);
|
|
400
|
+
platforms.Add(AirshipPlatform.Android);
|
|
401
|
+
// platforms.Add(AirshipPlatform.Windows);
|
|
402
|
+
// platforms.Add(AirshipPlatform.Mac);
|
|
403
403
|
}
|
|
404
404
|
|
|
405
405
|
if (!CreateAssetBundles.PrePublishChecks()) {
|
|
@@ -437,7 +437,7 @@ namespace Editor.Packages {
|
|
|
437
437
|
PlayerSettings.SetUseDefaultGraphicsAPIs(buildTarget, false);
|
|
438
438
|
PlayerSettings.SetGraphicsAPIs(buildTarget, new GraphicsDeviceType[]
|
|
439
439
|
{
|
|
440
|
-
GraphicsDeviceType.
|
|
440
|
+
GraphicsDeviceType.Vulkan
|
|
441
441
|
});
|
|
442
442
|
}
|
|
443
443
|
|
|
@@ -28,6 +28,7 @@ public class LoginApp : MonoBehaviour {
|
|
|
28
28
|
[SerializeField] public TMP_Text errorMessageText;
|
|
29
29
|
[SerializeField] public LoginButton steamLoginButton;
|
|
30
30
|
[SerializeField] public GameObject quitButton;
|
|
31
|
+
[SerializeField] public GameObject backButton;
|
|
31
32
|
|
|
32
33
|
[Header("Mobile")]
|
|
33
34
|
[SerializeField] public Canvas mobileCanvas;
|
|
@@ -99,6 +100,10 @@ public class LoginApp : MonoBehaviour {
|
|
|
99
100
|
this.quitButton.SetActive(Screen.fullScreen);
|
|
100
101
|
}
|
|
101
102
|
|
|
103
|
+
public void BackToFirstPage() {
|
|
104
|
+
this.RouteToPage(this.loginPage, false, false);
|
|
105
|
+
}
|
|
106
|
+
|
|
102
107
|
private void CalcLayout() {
|
|
103
108
|
this.screenWidth = Screen.width;
|
|
104
109
|
this.screenHeight = Screen.height;
|
|
@@ -146,6 +151,12 @@ public class LoginApp : MonoBehaviour {
|
|
|
146
151
|
loginPage.SetActive(false);
|
|
147
152
|
pickUsernamePage.SetActive(false);
|
|
148
153
|
pageGameObject.SetActive(true);
|
|
154
|
+
|
|
155
|
+
if (this.mobileMode) {
|
|
156
|
+
this.backButton.SetActive(false);
|
|
157
|
+
} else {
|
|
158
|
+
this.backButton.SetActive(pageGameObject != this.loginPage);
|
|
159
|
+
}
|
|
149
160
|
}
|
|
150
161
|
|
|
151
162
|
public async void PressContinueWithGoogle() {
|
|
@@ -19,7 +19,6 @@ using UnityEngine.UIElements;
|
|
|
19
19
|
using LightType = UnityEngine.LightType;
|
|
20
20
|
using UnityEngine.Tilemaps;
|
|
21
21
|
using UnityEngine.VFX;
|
|
22
|
-
using Toggle = UnityEngine.UI.Toggle;
|
|
23
22
|
|
|
24
23
|
#if UNITY_EDITOR
|
|
25
24
|
using UnityEditor;
|
|
@@ -132,6 +131,7 @@ namespace Luau {
|
|
|
132
131
|
[typeof(GridLayoutGroup)] = LuauContextAll,
|
|
133
132
|
[typeof(LayoutRebuilder)] = LuauContextAll,
|
|
134
133
|
[typeof(UnityEngine.UI.Button)] = LuauContextAll,
|
|
134
|
+
[typeof(ToggleGroup)] = LuauContextAll,
|
|
135
135
|
[typeof(Dropdown)] = LuauContextAll,
|
|
136
136
|
[typeof(TMP_Dropdown)] = LuauContextAll,
|
|
137
137
|
[typeof(TMP_InputField)] = LuauContextAll,
|
|
@@ -139,7 +139,7 @@ namespace Luau {
|
|
|
139
139
|
[typeof(TextMeshProUGUI)] = LuauContextAll,
|
|
140
140
|
[typeof(UnityEngine.UI.Slider)] = LuauContextAll,
|
|
141
141
|
[typeof(CanvasScaler)] = LuauContextAll,
|
|
142
|
-
[typeof(Toggle)] = LuauContextAll,
|
|
142
|
+
[typeof(UnityEngine.UI.Toggle)] = LuauContextAll,
|
|
143
143
|
[typeof(Mask)] = LuauContextAll,
|
|
144
144
|
[typeof(ContentSizeFitter)] = LuauContextAll,
|
|
145
145
|
[typeof(AspectRatioFitter)] = LuauContextAll,
|
|
@@ -221,6 +221,7 @@ namespace Luau {
|
|
|
221
221
|
["TubeRendererCS"] = LuauContextAll,
|
|
222
222
|
["AudioMixerSnapshotController"] = LuauContextAll,
|
|
223
223
|
["AudioMixerController"] = LuauContextAll,
|
|
224
|
+
["Toggle"] = LuauContextAll, // "no idea why this needs to be a string...
|
|
224
225
|
};
|
|
225
226
|
|
|
226
227
|
public static Dictionary<Type, LuauContext> allowedTypesInternal;
|
|
@@ -11,6 +11,8 @@ public class TypeReflection {
|
|
|
11
11
|
{ "RectTransform", typeof(RectTransform) },
|
|
12
12
|
{ "Button", typeof(Button) },
|
|
13
13
|
{ "Color", typeof(Color) },
|
|
14
|
+
{ "Toggle", typeof(Toggle) },
|
|
15
|
+
// { "ToggleGroup", typeof(ToggleGroup) }
|
|
14
16
|
};
|
|
15
17
|
private static readonly Dictionary<string, HashSet<string>> _assemblyNamespaceCache = new();
|
|
16
18
|
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
using System;
|
|
2
|
+
using UnityEngine;
|
|
3
|
+
|
|
4
|
+
[LuauAPI]
|
|
5
|
+
public class WheelColliderAPI : BaseLuaAPIClass {
|
|
6
|
+
public override Type GetAPIType() {
|
|
7
|
+
return typeof(WheelCollider);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
public override int OverrideMemberMethod(LuauContext context, IntPtr thread, object targetObject, string methodName, int numParameters,
|
|
11
|
+
ArraySegment<int> parameterDataPODTypes, ArraySegment<IntPtr> parameterDataPtrs, ArraySegment<int> parameterDataSizes) {
|
|
12
|
+
|
|
13
|
+
if (methodName == "GetGroundHit") {
|
|
14
|
+
var target = (WheelCollider)targetObject;
|
|
15
|
+
if (target.GetGroundHit(out var hit)) {
|
|
16
|
+
LuauCore.WritePropertyToThread(thread, hit, hit.GetType());
|
|
17
|
+
return 1;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
return 0;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
if (methodName == "GetWorldPose") {
|
|
24
|
+
var target = (WheelCollider)targetObject;
|
|
25
|
+
target.GetWorldPose(out var pos, out var quat);
|
|
26
|
+
LuauCore.WritePropertyToThread(thread, pos, pos.GetType());
|
|
27
|
+
LuauCore.WritePropertyToThread(thread, quat, quat.GetType());
|
|
28
|
+
return 2;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
return -1;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
using System;
|
|
2
2
|
using System.Collections.Generic;
|
|
3
3
|
using System.Linq;
|
|
4
|
+
using Code.Player;
|
|
4
5
|
using Mirror;
|
|
5
6
|
using Tayx.Graphy.Resim;
|
|
6
7
|
using UnityEngine;
|
|
@@ -49,7 +50,6 @@ namespace Code.Network.Simulation
|
|
|
49
50
|
{
|
|
50
51
|
public CheckWorld check;
|
|
51
52
|
public RollbackComplete complete;
|
|
52
|
-
public NetworkConnectionToClient client;
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
struct ResimulationRequest
|
|
@@ -122,12 +122,21 @@ namespace Code.Network.Simulation
|
|
|
122
122
|
* event to clean up any data that is no longer required.
|
|
123
123
|
*/
|
|
124
124
|
public event Action<object> OnHistoryLifetimeReached;
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Fired when lag compensated checks should occur. ID of check is passed as the event parameter.
|
|
128
|
+
*/
|
|
129
|
+
public event Action<object> OnLagCompensationRequestCheck;
|
|
130
|
+
/**
|
|
131
|
+
* Fired when lag compensated check is over and physics can be modified. ID of check is passed as the event parameter.
|
|
132
|
+
*/
|
|
133
|
+
public event Action<object> OnLagCompensationRequestComplete;
|
|
125
134
|
|
|
126
135
|
[NonSerialized] public bool replaying = false;
|
|
127
136
|
|
|
128
137
|
private bool isActive = false;
|
|
129
138
|
private List<double> tickTimes = new List<double>();
|
|
130
|
-
private List<LagCompensationRequest
|
|
139
|
+
private Dictionary<NetworkConnectionToClient, List<LagCompensationRequest>> lagCompensationRequests = new();
|
|
131
140
|
private Queue<ResimulationRequest> resimulationRequests = new();
|
|
132
141
|
|
|
133
142
|
public void ActivateSimulationManager()
|
|
@@ -185,15 +194,17 @@ namespace Code.Network.Simulation
|
|
|
185
194
|
// Note: This process is placed after snapshot processing so that changes made to physics (like an impulse)
|
|
186
195
|
// are processed on the _next_ tick. This is safe because the server never resimulates.
|
|
187
196
|
var processedLagCompensation = false;
|
|
188
|
-
foreach (var
|
|
197
|
+
foreach (var entry in this.lagCompensationRequests)
|
|
189
198
|
{
|
|
190
|
-
processedLagCompensation = true;
|
|
191
199
|
try
|
|
192
200
|
{
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
request.
|
|
201
|
+
processedLagCompensation = true;
|
|
202
|
+
// Debug.LogWarning("Server lag compensation rolling back for client " + entry.Key.connectionId);
|
|
203
|
+
OnLagCompensationCheck?.Invoke(entry.Key.connectionId, time, entry.Key.rtt);
|
|
204
|
+
foreach (var request in entry.Value)
|
|
205
|
+
{
|
|
206
|
+
request.check();
|
|
207
|
+
}
|
|
197
208
|
}
|
|
198
209
|
catch (Exception e)
|
|
199
210
|
{
|
|
@@ -208,11 +219,21 @@ namespace Code.Network.Simulation
|
|
|
208
219
|
// Reset back to the server view of the world at the current time.
|
|
209
220
|
OnSetSnapshot?.Invoke(time);
|
|
210
221
|
// Invoke all of the callbacks for modifying physics that should be applied in the next tick.
|
|
211
|
-
|
|
222
|
+
foreach (var entry in this.lagCompensationRequests)
|
|
212
223
|
{
|
|
213
|
-
|
|
214
|
-
|
|
224
|
+
foreach (var request in entry.Value)
|
|
225
|
+
{
|
|
226
|
+
try
|
|
227
|
+
{
|
|
228
|
+
request.complete();
|
|
229
|
+
}
|
|
230
|
+
catch (Exception e)
|
|
231
|
+
{
|
|
232
|
+
Debug.LogError(e);
|
|
233
|
+
}
|
|
234
|
+
}
|
|
215
235
|
}
|
|
236
|
+
this.lagCompensationRequests.Clear();
|
|
216
237
|
}
|
|
217
238
|
|
|
218
239
|
// Add our completed tick time into our history
|
|
@@ -237,14 +258,40 @@ namespace Code.Network.Simulation
|
|
|
237
258
|
public void ScheduleLagCompensation(NetworkConnectionToClient client, CheckWorld checkCallback,
|
|
238
259
|
RollbackComplete completeCallback)
|
|
239
260
|
{
|
|
240
|
-
|
|
261
|
+
List<LagCompensationRequest> list;
|
|
262
|
+
if (!this.lagCompensationRequests.TryGetValue(client, out list))
|
|
263
|
+
{
|
|
264
|
+
list = new();
|
|
265
|
+
this.lagCompensationRequests.Add(client, list);
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
list.Add(new LagCompensationRequest()
|
|
241
269
|
{
|
|
242
270
|
check = checkCallback,
|
|
243
271
|
complete = completeCallback,
|
|
244
|
-
client = client,
|
|
245
272
|
});
|
|
246
273
|
}
|
|
247
274
|
|
|
275
|
+
/**
|
|
276
|
+
* Schedules lag compensation for the provided ID. Used by TS to call ScheduleLagCompensation for a player in the Player.ts file.
|
|
277
|
+
*/
|
|
278
|
+
public string RequestLagCompensationCheck(int connectionId)
|
|
279
|
+
{
|
|
280
|
+
if (NetworkServer.connections.TryGetValue(connectionId, out var connection))
|
|
281
|
+
{
|
|
282
|
+
string uniqueId = Guid.NewGuid().ToString();
|
|
283
|
+
this.ScheduleLagCompensation(connection, () => {
|
|
284
|
+
this.OnLagCompensationRequestCheck?.Invoke(uniqueId);
|
|
285
|
+
}, () =>
|
|
286
|
+
{
|
|
287
|
+
this.OnLagCompensationRequestComplete?.Invoke(uniqueId);
|
|
288
|
+
});
|
|
289
|
+
return uniqueId;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
return "";
|
|
293
|
+
}
|
|
294
|
+
|
|
248
295
|
/**
|
|
249
296
|
* Schedules a resimulation to occur on the next tick. This allows correcting predicted history on a non authoritative client.
|
|
250
297
|
* The callback provided will be called when the resimulation should occur. The callback will be passed a resimulate
|
|
@@ -45,6 +45,15 @@ namespace Code.Player.Character.MovementSystems.Character
|
|
|
45
45
|
public bool drawDebugGizmos_STEPUP = false;
|
|
46
46
|
public bool drawDebugGizmos_STATES= false;
|
|
47
47
|
public bool useExtraLogging = false;
|
|
48
|
+
|
|
49
|
+
[Header("Prediction Correction Interpolation (server auth only)")]
|
|
50
|
+
[Tooltip("Controls the speed of correction when non-authoritative clients mis-predict their location. Unit is seconds.")]
|
|
51
|
+
[Range(0, 1)]
|
|
52
|
+
public float correctionInterpTime = 0.1f;
|
|
53
|
+
|
|
54
|
+
[Tooltip(
|
|
55
|
+
"Controls the maximum magnitude of the correction interp. Mis-predictions larger that this magnitude will instantly teleport the character to the correct location.")]
|
|
56
|
+
public float correctionMaxMagnitude = 10;
|
|
48
57
|
|
|
49
58
|
[Header("Visual Variables")]
|
|
50
59
|
public bool autoCalibrateSkiddingSpeed = true;
|
|
@@ -61,6 +70,21 @@ namespace Code.Player.Character.MovementSystems.Character
|
|
|
61
70
|
private Transform _cameraTransform;
|
|
62
71
|
private bool _smoothLookVector = false;
|
|
63
72
|
|
|
73
|
+
/**
|
|
74
|
+
* Used for calculating interp for non-authoritative clients. Set to the previous airshipTransform location
|
|
75
|
+
* OnPause (before resim). Used to calculate difference in simulated and actual position which is then
|
|
76
|
+
* applied to the airshipTransform.
|
|
77
|
+
*/
|
|
78
|
+
private Vector3 correctionLastSimulatedPosition = Vector3.zero;
|
|
79
|
+
/**
|
|
80
|
+
* The offset applied to the airshipTransform due to correction.
|
|
81
|
+
*/
|
|
82
|
+
private Vector3 correctionOffset = Vector3.zero;
|
|
83
|
+
/**
|
|
84
|
+
* How long since the last correction
|
|
85
|
+
*/
|
|
86
|
+
private float correctionTime = 0;
|
|
87
|
+
|
|
64
88
|
#endregion
|
|
65
89
|
|
|
66
90
|
#region EVENTS
|
|
@@ -117,15 +141,6 @@ namespace Code.Player.Character.MovementSystems.Character
|
|
|
117
141
|
|
|
118
142
|
public event Action<object, object> OnCompareSnapshots;
|
|
119
143
|
|
|
120
|
-
/**
|
|
121
|
-
* Fired when lag compensated checks should occur. ID of check is passed as the event parameter.
|
|
122
|
-
*/
|
|
123
|
-
public event Action<object> OnLagCompensationCheck;
|
|
124
|
-
/**
|
|
125
|
-
* Fired when lag compensated check is over and physics can be modified. ID of check is passed as the event parameter.
|
|
126
|
-
*/
|
|
127
|
-
public event Action<object> OnLagCompensationComplete;
|
|
128
|
-
|
|
129
144
|
public event Action<object> OnMoveDirectionChanged;
|
|
130
145
|
|
|
131
146
|
/// <summary>
|
|
@@ -213,10 +228,40 @@ namespace Code.Player.Character.MovementSystems.Character
|
|
|
213
228
|
rigidbody.isKinematic = false;
|
|
214
229
|
rigidbody.interpolation = RigidbodyInterpolation.Interpolate;
|
|
215
230
|
rigidbody.collisionDetectionMode = CollisionDetectionMode.ContinuousDynamic;
|
|
231
|
+
|
|
232
|
+
// non-authoritative client functions for interpolating mispredicts
|
|
233
|
+
if (isClient && mode == NetworkedStateSystemMode.Input)
|
|
234
|
+
{
|
|
235
|
+
AirshipSimulationManager.Instance.OnSetPaused += OnPaused;
|
|
236
|
+
}
|
|
216
237
|
}
|
|
217
238
|
|
|
218
239
|
OnSetMode?.Invoke(mode);
|
|
219
240
|
}
|
|
241
|
+
|
|
242
|
+
public void OnDestroy()
|
|
243
|
+
{
|
|
244
|
+
// non-authoritative client
|
|
245
|
+
if (isClient && mode == NetworkedStateSystemMode.Input)
|
|
246
|
+
{
|
|
247
|
+
AirshipSimulationManager.Instance.OnSetPaused -= OnPaused;
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
private void OnPaused(bool paused)
|
|
252
|
+
{
|
|
253
|
+
if (paused)
|
|
254
|
+
{
|
|
255
|
+
this.correctionLastSimulatedPosition = this.airshipTransform.position; // save the last transform position so that we calculate the difference from where the player sees themselves
|
|
256
|
+
}
|
|
257
|
+
else
|
|
258
|
+
{
|
|
259
|
+
this.correctionTime = 0;
|
|
260
|
+
var goalPosition = this.rigidbody.position;
|
|
261
|
+
var difference = this.correctionLastSimulatedPosition - goalPosition; // inverted so that when we apply the difference, we move the airshipTransform back to the original pos
|
|
262
|
+
this.correctionOffset = (difference.magnitude > correctionMaxMagnitude) ? Vector3.zero : difference;
|
|
263
|
+
}
|
|
264
|
+
}
|
|
220
265
|
|
|
221
266
|
public override void SetCurrentState(CharacterSnapshotData snapshot)
|
|
222
267
|
{
|
|
@@ -1124,6 +1169,16 @@ namespace Code.Player.Character.MovementSystems.Character
|
|
|
1124
1169
|
}
|
|
1125
1170
|
}
|
|
1126
1171
|
|
|
1172
|
+
public void Update()
|
|
1173
|
+
{
|
|
1174
|
+
if (this.correctionTime < 1)
|
|
1175
|
+
{
|
|
1176
|
+
this.correctionTime += correctionInterpTime == 0 ? 1 : Time.deltaTime / this.correctionInterpTime;
|
|
1177
|
+
this.airshipTransform.localPosition = Vector3.Lerp(this.correctionOffset, Vector3.zero,
|
|
1178
|
+
this.correctionTime);
|
|
1179
|
+
}
|
|
1180
|
+
}
|
|
1181
|
+
|
|
1127
1182
|
#region Helpers
|
|
1128
1183
|
|
|
1129
1184
|
private void SnapToY(float newY){
|
|
@@ -1182,19 +1237,6 @@ namespace Code.Player.Character.MovementSystems.Character
|
|
|
1182
1237
|
|
|
1183
1238
|
return true;
|
|
1184
1239
|
}
|
|
1185
|
-
|
|
1186
|
-
public string RequestLagCompensationCheck()
|
|
1187
|
-
{
|
|
1188
|
-
string uniqueId = Guid.NewGuid().ToString();
|
|
1189
|
-
AirshipSimulationManager.Instance.ScheduleLagCompensation(netIdentity.connectionToClient, () =>
|
|
1190
|
-
{
|
|
1191
|
-
this.OnLagCompensationCheck?.Invoke(uniqueId);
|
|
1192
|
-
}, () =>
|
|
1193
|
-
{
|
|
1194
|
-
this.OnLagCompensationComplete?.Invoke(uniqueId);
|
|
1195
|
-
});
|
|
1196
|
-
return uniqueId;
|
|
1197
|
-
}
|
|
1198
1240
|
|
|
1199
1241
|
public void SetMoveInput(Vector3 moveDir, bool jump, bool sprinting, bool crouch, int moveDirModeInt) {
|
|
1200
1242
|
moveDir = moveDir.normalized;
|
|
@@ -1466,7 +1508,7 @@ namespace Code.Player.Character.MovementSystems.Character
|
|
|
1466
1508
|
{
|
|
1467
1509
|
// Only used in the client authoritative networking mode.
|
|
1468
1510
|
if (mode != NetworkedStateSystemMode.Observer) return;
|
|
1469
|
-
OnImpactWithGround(velocity, hitInfo);
|
|
1511
|
+
OnImpactWithGround?.Invoke(velocity, hitInfo);
|
|
1470
1512
|
SAuthImpactEvent(velocity, hitInfo);
|
|
1471
1513
|
}
|
|
1472
1514
|
|
|
@@ -222,6 +222,7 @@ public class TypeGenerator : MonoBehaviour
|
|
|
222
222
|
typeof(GraphicsSettings),
|
|
223
223
|
typeof(UniversalRenderPipelineAsset),
|
|
224
224
|
typeof(WheelFrictionCurve),
|
|
225
|
+
typeof(WheelHit),
|
|
225
226
|
|
|
226
227
|
// Mirror
|
|
227
228
|
typeof(NetworkServer),
|
|
@@ -335,7 +336,7 @@ public class TypeGenerator : MonoBehaviour
|
|
|
335
336
|
"\\.OcclusionCam$",
|
|
336
337
|
"\\.AirshipUniVoiceNetwork$"
|
|
337
338
|
};
|
|
338
|
-
|
|
339
|
+
|
|
339
340
|
var options = new TypeScriptOptions
|
|
340
341
|
{
|
|
341
342
|
ShouldGenerateMethod = (info, definition) => true,
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
using System;
|
|
1
2
|
using System.Collections.Generic;
|
|
2
3
|
using System.IO;
|
|
3
4
|
using UnityEngine;
|
|
4
5
|
using UnityEngine.Profiling;
|
|
5
6
|
|
|
6
|
-
public class TexturePacker
|
|
7
|
+
public class TexturePacker : IDisposable
|
|
7
8
|
{
|
|
8
9
|
|
|
9
10
|
static int anisoLevel = 1;
|
|
@@ -14,12 +15,6 @@ public class TexturePacker
|
|
|
14
15
|
public RenderTexture diffuse;
|
|
15
16
|
public RenderTexture normals;
|
|
16
17
|
|
|
17
|
-
//destructor
|
|
18
|
-
~TexturePacker()
|
|
19
|
-
{
|
|
20
|
-
Dispose();
|
|
21
|
-
}
|
|
22
|
-
|
|
23
18
|
public void Dispose()
|
|
24
19
|
{
|
|
25
20
|
if (diffuse != null)
|
|
@@ -398,11 +398,6 @@ public class VoxelBlocks : MonoBehaviour {
|
|
|
398
398
|
}
|
|
399
399
|
}
|
|
400
400
|
|
|
401
|
-
//Destructor
|
|
402
|
-
~VoxelBlocks() {
|
|
403
|
-
atlas?.Dispose();
|
|
404
|
-
}
|
|
405
|
-
|
|
406
401
|
private void Clear() {
|
|
407
402
|
blockIdCounter = 0;
|
|
408
403
|
atlasMaterial = null;
|
|
@@ -600,6 +595,11 @@ public class VoxelBlocks : MonoBehaviour {
|
|
|
600
595
|
meshList[i] = meshToAdd;
|
|
601
596
|
}
|
|
602
597
|
}
|
|
598
|
+
|
|
599
|
+
private void OnDestroy() {
|
|
600
|
+
atlas?.Dispose();
|
|
601
|
+
}
|
|
602
|
+
|
|
603
603
|
public void Load(bool loadTexturesDirectlyFromDisk = false) {
|
|
604
604
|
//clear everything
|
|
605
605
|
Clear();
|
|
@@ -6,7 +6,7 @@ TextureImporter:
|
|
|
6
6
|
serializedVersion: 13
|
|
7
7
|
mipmaps:
|
|
8
8
|
mipMapMode: 0
|
|
9
|
-
enableMipMap:
|
|
9
|
+
enableMipMap: 0
|
|
10
10
|
sRGBTexture: 1
|
|
11
11
|
linearTexture: 0
|
|
12
12
|
fadeOut: 0
|
|
@@ -37,13 +37,13 @@ TextureImporter:
|
|
|
37
37
|
filterMode: 1
|
|
38
38
|
aniso: 1
|
|
39
39
|
mipBias: 0
|
|
40
|
-
wrapU:
|
|
41
|
-
wrapV:
|
|
40
|
+
wrapU: 1
|
|
41
|
+
wrapV: 1
|
|
42
42
|
wrapW: 0
|
|
43
|
-
nPOTScale:
|
|
43
|
+
nPOTScale: 0
|
|
44
44
|
lightmap: 0
|
|
45
45
|
compressionQuality: 50
|
|
46
|
-
spriteMode:
|
|
46
|
+
spriteMode: 1
|
|
47
47
|
spriteExtrude: 1
|
|
48
48
|
spriteMeshType: 1
|
|
49
49
|
alignment: 0
|
|
@@ -52,9 +52,9 @@ TextureImporter:
|
|
|
52
52
|
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
|
53
53
|
spriteGenerateFallbackPhysicsShape: 1
|
|
54
54
|
alphaUsage: 1
|
|
55
|
-
alphaIsTransparency:
|
|
55
|
+
alphaIsTransparency: 1
|
|
56
56
|
spriteTessellationDetail: -1
|
|
57
|
-
textureType:
|
|
57
|
+
textureType: 8
|
|
58
58
|
textureShape: 1
|
|
59
59
|
singleChannelComponent: 0
|
|
60
60
|
flipbookRows: 1
|
|
@@ -67,7 +67,7 @@ TextureImporter:
|
|
|
67
67
|
swizzle: 50462976
|
|
68
68
|
cookieLightType: 0
|
|
69
69
|
platformSettings:
|
|
70
|
-
- serializedVersion:
|
|
70
|
+
- serializedVersion: 4
|
|
71
71
|
buildTarget: DefaultTexturePlatform
|
|
72
72
|
maxTextureSize: 2048
|
|
73
73
|
resizeAlgorithm: 0
|
|
@@ -80,7 +80,7 @@ TextureImporter:
|
|
|
80
80
|
ignorePlatformSupport: 0
|
|
81
81
|
androidETC2FallbackOverride: 0
|
|
82
82
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
|
83
|
-
- serializedVersion:
|
|
83
|
+
- serializedVersion: 4
|
|
84
84
|
buildTarget: Standalone
|
|
85
85
|
maxTextureSize: 2048
|
|
86
86
|
resizeAlgorithm: 0
|
|
@@ -93,7 +93,7 @@ TextureImporter:
|
|
|
93
93
|
ignorePlatformSupport: 0
|
|
94
94
|
androidETC2FallbackOverride: 0
|
|
95
95
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
|
96
|
-
- serializedVersion:
|
|
96
|
+
- serializedVersion: 4
|
|
97
97
|
buildTarget: Server
|
|
98
98
|
maxTextureSize: 2048
|
|
99
99
|
resizeAlgorithm: 0
|
|
@@ -106,7 +106,7 @@ TextureImporter:
|
|
|
106
106
|
ignorePlatformSupport: 0
|
|
107
107
|
androidETC2FallbackOverride: 0
|
|
108
108
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
|
109
|
-
- serializedVersion:
|
|
109
|
+
- serializedVersion: 4
|
|
110
110
|
buildTarget: Android
|
|
111
111
|
maxTextureSize: 2048
|
|
112
112
|
resizeAlgorithm: 0
|
|
@@ -119,8 +119,8 @@ TextureImporter:
|
|
|
119
119
|
ignorePlatformSupport: 0
|
|
120
120
|
androidETC2FallbackOverride: 0
|
|
121
121
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
|
122
|
-
- serializedVersion:
|
|
123
|
-
buildTarget:
|
|
122
|
+
- serializedVersion: 4
|
|
123
|
+
buildTarget: iOS
|
|
124
124
|
maxTextureSize: 2048
|
|
125
125
|
resizeAlgorithm: 0
|
|
126
126
|
textureFormat: -1
|
|
@@ -136,15 +136,18 @@ TextureImporter:
|
|
|
136
136
|
serializedVersion: 2
|
|
137
137
|
sprites: []
|
|
138
138
|
outline: []
|
|
139
|
+
customData:
|
|
139
140
|
physicsShape: []
|
|
140
141
|
bones: []
|
|
141
|
-
spriteID:
|
|
142
|
+
spriteID: 5e97eb03825dee720800000000000000
|
|
142
143
|
internalID: 0
|
|
143
144
|
vertices: []
|
|
144
145
|
indices:
|
|
145
146
|
edges: []
|
|
146
147
|
weights: []
|
|
147
148
|
secondaryTextures: []
|
|
149
|
+
spriteCustomMetadata:
|
|
150
|
+
entries: []
|
|
148
151
|
nameFileIdTable: {}
|
|
149
152
|
mipmapLimitGroupName:
|
|
150
153
|
pSDRemoveMatte: 0
|