gg.easy.airship 0.1.2119 → 0.1.2120
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/TypescriptServices/TypescriptServices.cs +16 -0
- package/Runtime/Code/Bootstrap/BundleDownloader.cs +2 -1
- package/Runtime/Code/Bootstrap/ServerBootstrap.cs +1 -1
- package/Runtime/Code/Bundles/AirshipLuauDebugger.cs +61 -0
- package/Runtime/Code/Bundles/SystemRoot.cs +14 -45
- package/Runtime/Code/Luau/AirshipComponent.cs +1 -0
- package/Runtime/Code/Luau/LuauMetadata.cs +1 -0
- package/Runtime/Code/Luau/LuauMetadataPropertySerializer.cs +12 -0
- package/Runtime/Code/Luau/LuauSignalWrapper.cs +1 -0
- package/Runtime/Code/Luau/ThreadManager.cs +11 -0
- package/Runtime/Code/Network/AirshipNetworkManager.cs +1 -0
- package/Runtime/Code/Player/Character/Animation/CharacterAnimationHelper.cs +8 -3
- package/Runtime/Code/Player/Character/MovementSystem/CharacterMovement.cs +24 -0
- package/Runtime/Code/Player/OcclusionCam.cs +68 -21
- package/Runtime/Code/RemoteConsole/ServerConsole.cs +62 -3
- package/Runtime/Code/TSCodeGen/TypeGenerator.cs +1 -0
- package/Runtime/DevConsole/Resources/Prefabs/FAB_DevConsole.Instance.prefab +293 -2
- package/Runtime/DevConsole/Runtime/DevConsoleMono.cs +6 -1
- package/Runtime/Plugins/Android/libLuauPlugin.so +0 -0
- package/Runtime/Plugins/Linux/libLuauPlugin.so +0 -0
- 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/URP/{AirshipURPAssetBaked.asset → AirshipURPAsset.asset} +2 -2
- package/package.json +1 -1
- package/URP/AirshipURPAssetRealtime.asset +0 -132
- package/URP/AirshipURPAssetRealtime.asset.meta +0 -8
- /package/URP/{AirshipURPAssetBaked.asset.meta → AirshipURPAsset.asset.meta} +0 -0
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
using System;
|
|
3
3
|
using System.Collections;
|
|
4
4
|
using System.Linq;
|
|
5
|
+
using System.Threading;
|
|
6
|
+
using System.Threading.Tasks;
|
|
5
7
|
using Editor;
|
|
6
8
|
using Editor.EditorInternal;
|
|
7
9
|
using Editor.Packages;
|
|
@@ -78,6 +80,20 @@ namespace Airship.Editor {
|
|
|
78
80
|
EditorApplication.isPlaying = false;
|
|
79
81
|
}
|
|
80
82
|
}
|
|
83
|
+
|
|
84
|
+
// Require files compiled to go into play mode
|
|
85
|
+
if (obj == PlayModeStateChange.ExitingEditMode && EditorApplication.isPlayingOrWillChangePlaymode && TypescriptCompilationService.IsCompilingFiles) {
|
|
86
|
+
// We'll yield the editor to wait for those files to finish compiling before entering play mode...
|
|
87
|
+
while (TypescriptCompilationService.IsCompilingFiles || TypescriptCompilationService.IsImportingFiles) {
|
|
88
|
+
var compilationState = TypescriptProjectsService.Project.CompilationState;
|
|
89
|
+
EditorUtility.DisplayProgressBar("Typescript Services",
|
|
90
|
+
$"Finishing compilation of Typescript files ({compilationState.CompiledFileCount}/{compilationState.FilesToCompileCount})",
|
|
91
|
+
(float) compilationState.CompiledFileCount / compilationState.FilesToCompileCount);
|
|
92
|
+
Thread.Sleep(10);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
EditorUtility.ClearProgressBar();
|
|
96
|
+
}
|
|
81
97
|
}
|
|
82
98
|
|
|
83
99
|
private static bool HasAllPackagesDownloaded() {
|
|
@@ -76,6 +76,8 @@ public class BundleDownloader : Singleton<BundleDownloader> {
|
|
|
76
76
|
bundleFilesToDownload.Add(remoteBundleFile);
|
|
77
77
|
}
|
|
78
78
|
|
|
79
|
+
var downloadSt = Stopwatch.StartNew();
|
|
80
|
+
|
|
79
81
|
// Calculate total download size
|
|
80
82
|
var device = DeviceBridge.GetDeviceType();
|
|
81
83
|
if (device is AirshipDeviceType.Phone or AirshipDeviceType.Tablet && loadingScreen && loadingScreen.showContinueButton && bundleFilesToDownload.Count > 0) {
|
|
@@ -111,7 +113,6 @@ public class BundleDownloader : Singleton<BundleDownloader> {
|
|
|
111
113
|
}
|
|
112
114
|
}
|
|
113
115
|
|
|
114
|
-
var downloadSt = Stopwatch.StartNew();
|
|
115
116
|
// Download files
|
|
116
117
|
var bundleIndex = 0;
|
|
117
118
|
this.totalDownload.Clear();
|
|
@@ -405,7 +405,7 @@ public class ServerBootstrap : MonoBehaviour
|
|
|
405
405
|
foreach (var doc in this.startupConfig.packages) {
|
|
406
406
|
Debug.Log($" - id={doc.id}, version={doc.assetVersion}, code-version={doc.codeVersion}, publish={doc.publishVersionNumber}, game={doc.game},");
|
|
407
407
|
}
|
|
408
|
-
Debug.Log(" - " + gameCodeZipUrl);
|
|
408
|
+
// Debug.Log(" - " + gameCodeZipUrl);
|
|
409
409
|
AnalyticsRecorder.InitGame(this.startupConfig);
|
|
410
410
|
|
|
411
411
|
yield return LoadWithStartupConfig(privateRemoteBundleFiles.ToArray(), gameCodeZipUrl);
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
using System;
|
|
2
2
|
using System.Collections.Generic;
|
|
3
|
+
using System.Text;
|
|
3
4
|
using Code.Bundles;
|
|
5
|
+
using Luau;
|
|
4
6
|
using Mirror;
|
|
5
7
|
using UnityEngine;
|
|
6
8
|
|
|
@@ -8,6 +10,7 @@ public class AirshipLuauDebugger : NetworkBehaviour {
|
|
|
8
10
|
[NonSerialized] [SyncVar] public string luauPluginVersion = LuauPlugin.LuauGetLuauPluginVersion();
|
|
9
11
|
[NonSerialized] [SyncVar] public LuauPlugin.LuauBytecodeVersion bytecodeVersion = LuauPlugin.LuauGetBytecodeVersion();
|
|
10
12
|
[NonSerialized] [SyncVar] public string serverPlayerVersion = "";
|
|
13
|
+
[NonSerialized] [SyncVar(hook = nameof(OnLuauObjectsDebugStringChanged))] public string luauObjectsDebugString = "";
|
|
11
14
|
|
|
12
15
|
[NonSerialized]
|
|
13
16
|
public readonly SyncDictionary<LuauContext, List<LuauPlugin.LuauMemoryCategoryDumpItem>> ServerMemDump = new();
|
|
@@ -45,4 +48,62 @@ public class AirshipLuauDebugger : NetworkBehaviour {
|
|
|
45
48
|
|
|
46
49
|
ServerUnityObjects = LuauPlugin.LuauGetUnityObjectCount();
|
|
47
50
|
}
|
|
51
|
+
|
|
52
|
+
[Command(requiresAuthority = false)]
|
|
53
|
+
public void FetchServerLuauInstanceIds(LuauContext context) {
|
|
54
|
+
luauObjectsDebugString = "SERVER " + FetchLuauUnityInstanceIds(context);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
public static string FetchLuauUnityInstanceIds(LuauContext context) {
|
|
58
|
+
var instanceIds = LuauPlugin.LuauDebugGetAllTrackedInstanceIds(context);
|
|
59
|
+
|
|
60
|
+
var sb = new StringBuilder("OBJECTS:\n");
|
|
61
|
+
|
|
62
|
+
// Count objects by unique name/type:
|
|
63
|
+
var countByName = new Dictionary<string, int>();
|
|
64
|
+
foreach (var instanceId in instanceIds) {
|
|
65
|
+
var obj = ThreadDataManager.GetObjectReference(IntPtr.Zero, instanceId, true, true);
|
|
66
|
+
if (obj is UnityEngine.Object unityObj) {
|
|
67
|
+
var t = unityObj.GetType();
|
|
68
|
+
var n = "(Destroyed)";
|
|
69
|
+
if (unityObj != null) {
|
|
70
|
+
n = unityObj.name;
|
|
71
|
+
} else {
|
|
72
|
+
var cachedName = ThreadDataManager.GetObjectReferenceName_TEMP_DEBUG(instanceId);
|
|
73
|
+
if (cachedName != null) {
|
|
74
|
+
n = cachedName + " (Destroyed)";
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
var objName = $"[{t.Name}] {n}";
|
|
78
|
+
if (!countByName.TryAdd(objName, 1)) {
|
|
79
|
+
countByName[objName]++;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
// Include top 20:
|
|
85
|
+
for (var i = 0; i < 20; i++) {
|
|
86
|
+
if (countByName.Count == 0) break;
|
|
87
|
+
|
|
88
|
+
// Find top item:
|
|
89
|
+
var topKey = "";
|
|
90
|
+
var topCount = 0;
|
|
91
|
+
foreach (var (key, count) in countByName) {
|
|
92
|
+
if (count > topCount) {
|
|
93
|
+
topKey = key;
|
|
94
|
+
topCount = count;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
sb.AppendLine($"{topKey}: {topCount}");
|
|
99
|
+
countByName.Remove(topKey);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
return sb.ToString();
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
private void OnLuauObjectsDebugStringChanged(string oldStr, string newStr) {
|
|
106
|
+
// Log on the client when the value changes:
|
|
107
|
+
Debug.Log(newStr);
|
|
108
|
+
}
|
|
48
109
|
}
|
|
@@ -6,16 +6,13 @@ using System.IO.Compression;
|
|
|
6
6
|
using Code.Bootstrap;
|
|
7
7
|
using Luau;
|
|
8
8
|
using System;
|
|
9
|
-
using System.Text;
|
|
10
9
|
using Airship.DevConsole;
|
|
11
10
|
using Code.Bundles;
|
|
12
|
-
using JetBrains.Annotations;
|
|
13
11
|
using Mirror;
|
|
14
12
|
#if UNITY_EDITOR
|
|
15
13
|
using UnityEditor;
|
|
16
14
|
#endif
|
|
17
15
|
using UnityEngine;
|
|
18
|
-
using UnityEngine.Networking;
|
|
19
16
|
using UnityEngine.Serialization;
|
|
20
17
|
using Application = UnityEngine.Application;
|
|
21
18
|
using Debug = UnityEngine.Debug;
|
|
@@ -677,60 +674,32 @@ public class SystemRoot : Singleton<SystemRoot> {
|
|
|
677
674
|
Debug.Log(registryDump);
|
|
678
675
|
}));
|
|
679
676
|
|
|
680
|
-
DevConsole.AddCommand(Command.Create<string>("luauobjects", "", "Prints
|
|
677
|
+
DevConsole.AddCommand(Command.Create<string>("luauobjects", "", "Prints count of Unity objects tracked by Luau plugin", Parameter.Create("context", "Options: game, protected, game_server, protected_server"), (val) => {
|
|
681
678
|
val = val.ToLower();
|
|
679
|
+
|
|
680
|
+
var context = LuauContext.Game;
|
|
681
|
+
var onServer = val.EndsWith("_server", StringComparison.OrdinalIgnoreCase);
|
|
682
682
|
|
|
683
683
|
int[] instanceIds;
|
|
684
684
|
switch (val) {
|
|
685
|
-
case "game":
|
|
686
|
-
|
|
685
|
+
case "game" or "game_server":
|
|
686
|
+
context = LuauContext.Game;
|
|
687
687
|
break;
|
|
688
|
-
case "protected":
|
|
689
|
-
|
|
688
|
+
case "protected" or "protected_server":
|
|
689
|
+
context = LuauContext.Protected;
|
|
690
690
|
break;
|
|
691
691
|
default:
|
|
692
692
|
Debug.Log($"Invalid context: \"{val}\"");
|
|
693
693
|
return;
|
|
694
694
|
}
|
|
695
695
|
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
if (obj is UnityEngine.Object unityObj) {
|
|
703
|
-
var t = unityObj.GetType();
|
|
704
|
-
var n = "(Destroyed)";
|
|
705
|
-
if (unityObj != null) {
|
|
706
|
-
n = unityObj.name;
|
|
707
|
-
}
|
|
708
|
-
var objName = $"[{t.Name}] {n}";
|
|
709
|
-
if (!countByName.TryAdd(objName, 1)) {
|
|
710
|
-
countByName[objName]++;
|
|
711
|
-
}
|
|
712
|
-
}
|
|
713
|
-
}
|
|
714
|
-
|
|
715
|
-
// Include top 20:
|
|
716
|
-
for (var i = 0; i < 20; i++) {
|
|
717
|
-
if (countByName.Count == 0) break;
|
|
718
|
-
|
|
719
|
-
// Find top item:
|
|
720
|
-
var topKey = "";
|
|
721
|
-
var topCount = 0;
|
|
722
|
-
foreach (var (key, count) in countByName) {
|
|
723
|
-
if (count > topCount) {
|
|
724
|
-
topKey = key;
|
|
725
|
-
topCount = count;
|
|
726
|
-
}
|
|
727
|
-
}
|
|
728
|
-
|
|
729
|
-
sb.AppendLine($"{topKey}: {topCount}");
|
|
730
|
-
countByName.Remove(topKey);
|
|
696
|
+
if (onServer) {
|
|
697
|
+
var server = FindAnyObjectByType<AirshipLuauDebugger>();
|
|
698
|
+
server.FetchServerLuauInstanceIds(context);
|
|
699
|
+
} else {
|
|
700
|
+
var str = AirshipLuauDebugger.FetchLuauUnityInstanceIds(context);
|
|
701
|
+
Debug.Log(str);
|
|
731
702
|
}
|
|
732
|
-
|
|
733
|
-
Debug.Log(sb.ToString());
|
|
734
703
|
}));
|
|
735
704
|
|
|
736
705
|
DevConsole.AddCommand(Command.Create("version", "", "Prints version git hash", () => {
|
|
@@ -290,6 +290,7 @@ public class AirshipComponent : MonoBehaviour {
|
|
|
290
290
|
AirshipBehaviourRootV2.CleanIdOnDestroy(gameObject, this);
|
|
291
291
|
if (LuauState.IsContextActive(context)) {
|
|
292
292
|
LuauPlugin.LuauUnpinThread(thread);
|
|
293
|
+
LuauPlugin.LuauDestroyThread(thread);
|
|
293
294
|
}
|
|
294
295
|
thread = IntPtr.Zero;
|
|
295
296
|
LuauCore.onResetInstance -= OnLuauReset;
|
|
@@ -66,6 +66,18 @@ namespace Luau {
|
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
68
|
obj = Activator.CreateInstance(objType, args);
|
|
69
|
+
} else if (objDefaultVal.target == "method") {
|
|
70
|
+
var args = objDefaultVal.arguments.ToArray();
|
|
71
|
+
for (var i = 0; i < args.Length; i++)
|
|
72
|
+
{
|
|
73
|
+
if (args[i] is double)
|
|
74
|
+
{
|
|
75
|
+
args[i] = Convert.ToSingle(args[i]);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
var expectedMethod = objType.GetMethod(objDefaultVal.method);
|
|
80
|
+
obj = expectedMethod?.Invoke(null, args);
|
|
69
81
|
}
|
|
70
82
|
|
|
71
83
|
// Can't use JSONUtility on AnimationCurve
|
|
@@ -35,6 +35,7 @@ namespace Luau {
|
|
|
35
35
|
s_workingListDirty = true;
|
|
36
36
|
m_threadData.Clear();
|
|
37
37
|
s_objectKeys.Clear();
|
|
38
|
+
s_objectNames_TEMP_DEBUG.Clear();
|
|
38
39
|
s_reverseObjectKeys.Clear();
|
|
39
40
|
s_cleanUpKeys.Clear();
|
|
40
41
|
s_debuggingKeys.Clear();
|
|
@@ -64,6 +65,7 @@ namespace Luau {
|
|
|
64
65
|
|
|
65
66
|
//Keep strong references to all objects created
|
|
66
67
|
private static Dictionary<int, object> s_objectKeys = new();
|
|
68
|
+
private static Dictionary<int, string> s_objectNames_TEMP_DEBUG = new();
|
|
67
69
|
public static Dictionary<object, int> s_reverseObjectKeys = new();
|
|
68
70
|
private static HashSet<int> s_cleanUpKeys = new HashSet<int>();
|
|
69
71
|
|
|
@@ -84,6 +86,9 @@ namespace Luau {
|
|
|
84
86
|
//Only place objects get added to the dictionary
|
|
85
87
|
s_objectKeys.Add(s_keyGen, obj);
|
|
86
88
|
s_reverseObjectKeys.Add(obj, s_keyGen);
|
|
89
|
+
if (obj is GameObject go) {
|
|
90
|
+
s_objectNames_TEMP_DEBUG.Add(s_keyGen, go.name);
|
|
91
|
+
}
|
|
87
92
|
|
|
88
93
|
if (s_debugging) {
|
|
89
94
|
Debug.Log("GC add reference to " + obj + " id: " + s_keyGen);
|
|
@@ -159,6 +164,11 @@ namespace Luau {
|
|
|
159
164
|
return value;
|
|
160
165
|
}
|
|
161
166
|
|
|
167
|
+
public static string GetObjectReferenceName_TEMP_DEBUG(int instanceId) {
|
|
168
|
+
var res = s_objectNames_TEMP_DEBUG.TryGetValue(instanceId, out var objName);
|
|
169
|
+
return res ? objName : null;
|
|
170
|
+
}
|
|
171
|
+
|
|
162
172
|
public static void DeleteObjectReference(int instanceId) {
|
|
163
173
|
if (s_debugging) {
|
|
164
174
|
Debug.Log("GC removed reference to " + instanceId);
|
|
@@ -342,6 +352,7 @@ namespace Luau {
|
|
|
342
352
|
s_reverseObjectKeys.Remove(obj);
|
|
343
353
|
}
|
|
344
354
|
s_objectKeys.Remove(key);
|
|
355
|
+
s_objectNames_TEMP_DEBUG.Remove(key);
|
|
345
356
|
}
|
|
346
357
|
s_cleanUpKeys.Clear();
|
|
347
358
|
Profiler.EndSample();
|
|
@@ -46,6 +46,7 @@ public class AirshipNetworkManager : NetworkManager {
|
|
|
46
46
|
base.OnStopClient();
|
|
47
47
|
// Debug.Log("OnStopClient");
|
|
48
48
|
this.clientBundleLoader.CleanupClient();
|
|
49
|
+
this.serverConsole.OnStopClient();
|
|
49
50
|
|
|
50
51
|
var clientNetworkConnector = FindAnyObjectByType<ClientNetworkConnector>();
|
|
51
52
|
if (clientNetworkConnector != null) {
|
|
@@ -36,6 +36,11 @@ public class CharacterAnimationHelper : MonoBehaviour {
|
|
|
36
36
|
|
|
37
37
|
public bool isSkidding {get; private set;} = false;
|
|
38
38
|
|
|
39
|
+
[Header("Animation Calibration")]
|
|
40
|
+
public float animWalkSpeed = 4.4444445f;
|
|
41
|
+
public float animRunSpeed = 6.6666667f;
|
|
42
|
+
public float animCrouchSpeed = 2.1233335f;
|
|
43
|
+
|
|
39
44
|
private float nextIdleReactionLength = 0;
|
|
40
45
|
private AnimatorOverrideController animatorOverride;
|
|
41
46
|
private CharacterState currentState = CharacterState.Idle;
|
|
@@ -183,11 +188,11 @@ public class CharacterAnimationHelper : MonoBehaviour {
|
|
|
183
188
|
|
|
184
189
|
public void SetVelocity(Vector3 localVel) {
|
|
185
190
|
//The target speed is the movement speed the animations were built for
|
|
186
|
-
var targetSpeed =
|
|
191
|
+
var targetSpeed = animWalkSpeed;
|
|
187
192
|
if (currentState == CharacterState.Sprinting) {
|
|
188
|
-
targetSpeed =
|
|
193
|
+
targetSpeed = animRunSpeed;
|
|
189
194
|
} else if (currentState == CharacterState.Crouching) {
|
|
190
|
-
targetSpeed =
|
|
195
|
+
targetSpeed = animCrouchSpeed;
|
|
191
196
|
}
|
|
192
197
|
currentSpeed = new Vector2(localVel.x, localVel.z).magnitude;
|
|
193
198
|
this.targetPlaybackSpeed = currentSpeed / targetSpeed;
|
|
@@ -447,6 +447,7 @@ public class CharacterMovement : NetworkBehaviour {
|
|
|
447
447
|
currentMoveState.jumpCount = 0;
|
|
448
448
|
currentMoveState.timeSinceBecameGrounded = 0f;
|
|
449
449
|
OnImpactWithGround?.Invoke(currentVelocity, groundHit);
|
|
450
|
+
CommandImpactWithGround(currentVelocity, groundHit);
|
|
450
451
|
} else {
|
|
451
452
|
currentMoveState.timeSinceBecameGrounded
|
|
452
453
|
= Math.Min(currentMoveState.timeSinceBecameGrounded + deltaTime, 100f);
|
|
@@ -541,6 +542,7 @@ public class CharacterMovement : NetworkBehaviour {
|
|
|
541
542
|
newVelocity.y = moveData.jumpSpeed;
|
|
542
543
|
currentMoveState.airborneFromImpulse = false;
|
|
543
544
|
OnJumped?.Invoke(newVelocity);
|
|
545
|
+
CommandNotifyJump(newVelocity);
|
|
544
546
|
}
|
|
545
547
|
}
|
|
546
548
|
|
|
@@ -1405,4 +1407,26 @@ public class CharacterMovement : NetworkBehaviour {
|
|
|
1405
1407
|
public bool IsIntersectingWithBlock() {
|
|
1406
1408
|
return false;
|
|
1407
1409
|
}
|
|
1410
|
+
|
|
1411
|
+
[Command]
|
|
1412
|
+
void CommandImpactWithGround(Vector3 velocity, RaycastHit hit) {
|
|
1413
|
+
RpcImpactWithGround(velocity, hit);
|
|
1414
|
+
}
|
|
1415
|
+
|
|
1416
|
+
[ClientRpc(includeOwner = false)]
|
|
1417
|
+
void RpcImpactWithGround(Vector3 velocity, RaycastHit hit) {
|
|
1418
|
+
OnImpactWithGround?.Invoke(velocity, hit);
|
|
1419
|
+
}
|
|
1420
|
+
|
|
1421
|
+
[Command]
|
|
1422
|
+
void CommandNotifyJump(Vector3 jumpVelocity)
|
|
1423
|
+
{
|
|
1424
|
+
RpcPlayerJumped(jumpVelocity);
|
|
1425
|
+
}
|
|
1426
|
+
|
|
1427
|
+
[ClientRpc(includeOwner = false)]
|
|
1428
|
+
void RpcPlayerJumped(Vector3 jumpVelocity)
|
|
1429
|
+
{
|
|
1430
|
+
OnJumped?.Invoke(jumpVelocity);
|
|
1431
|
+
}
|
|
1408
1432
|
}
|
|
@@ -21,26 +21,24 @@ namespace Code.Player {
|
|
|
21
21
|
private float _projectionX;
|
|
22
22
|
private float _projectionY;
|
|
23
23
|
|
|
24
|
+
private RaycastHit[] raycast2Hits;
|
|
25
|
+
|
|
24
26
|
public void Init(Camera camera)
|
|
25
27
|
{
|
|
26
28
|
targetCamera = camera;
|
|
27
29
|
OnScreenSizeChanged();
|
|
28
30
|
}
|
|
29
31
|
|
|
30
|
-
private void Update()
|
|
31
|
-
|
|
32
|
-
if (!targetCamera)
|
|
33
|
-
{
|
|
32
|
+
private void Update() {
|
|
33
|
+
if (!targetCamera) {
|
|
34
34
|
return;
|
|
35
35
|
}
|
|
36
|
-
if (Screen.width != _res.x || Screen.height != _res.y || Math.Abs(_fov - targetCamera.fieldOfView) > 0.001f)
|
|
37
|
-
{
|
|
36
|
+
if (Screen.width != _res.x || Screen.height != _res.y || Math.Abs(_fov - targetCamera.fieldOfView) > 0.001f) {
|
|
38
37
|
OnScreenSizeChanged();
|
|
39
38
|
}
|
|
40
39
|
}
|
|
41
40
|
|
|
42
|
-
private void OnScreenSizeChanged()
|
|
43
|
-
{
|
|
41
|
+
private void OnScreenSizeChanged() {
|
|
44
42
|
_res.x = Screen.width;
|
|
45
43
|
_res.y = Screen.height;
|
|
46
44
|
_fov = targetCamera.fieldOfView;
|
|
@@ -50,27 +48,76 @@ namespace Code.Player {
|
|
|
50
48
|
_projectionX = _projectionY * aspectRatio;
|
|
51
49
|
}
|
|
52
50
|
|
|
51
|
+
Vector3 GetCameraBoxExtents(Camera cam) {
|
|
52
|
+
float near = cam.nearClipPlane;
|
|
53
|
+
float halfHeight = Mathf.Tan(cam.fieldOfView * 0.5f * Mathf.Deg2Rad) * near;
|
|
54
|
+
float halfWidth = halfHeight * cam.aspect;
|
|
55
|
+
return new Vector3(halfWidth, halfHeight, 0.05f); // Slight depth to make it 3D
|
|
56
|
+
}
|
|
57
|
+
|
|
53
58
|
// Called from TS/Lua side
|
|
54
59
|
// Returns the ending distance from the target
|
|
55
|
-
public void BumpForOcclusion(Vector3
|
|
60
|
+
public void BumpForOcclusion(Vector3 targetPosition, Vector3 characterPosition, int mask) {
|
|
61
|
+
GizmoUtils.DrawSphere(targetPosition, 0.05f, Color.white);
|
|
56
62
|
var t = transform;
|
|
57
63
|
var camPos = t.position;
|
|
58
|
-
var
|
|
64
|
+
var mainDir = camPos - targetPosition;
|
|
65
|
+
|
|
66
|
+
// Vector3 boxHalfExtents = this.GetCameraBoxExtents(this.targetCamera);
|
|
67
|
+
// var boxHalfExtents = new Vector3(_projectionX * 0.02f, _projectionY * 0.02f, 0.01f);
|
|
68
|
+
// var boxHalfExtents = new Vector3(0.25f, 0.15f, 0f);
|
|
69
|
+
|
|
70
|
+
var preDir = (targetPosition - characterPosition).normalized;
|
|
71
|
+
var preDirDistance = Vector3.Distance(targetPosition, characterPosition);
|
|
72
|
+
var mainDistanceMod = 1f;
|
|
73
|
+
|
|
59
74
|
// If cam is too far above attach pos snap up
|
|
60
|
-
if (this.adjustToHead
|
|
61
|
-
|
|
75
|
+
if (this.adjustToHead) {
|
|
76
|
+
float pitch = t.eulerAngles.x;
|
|
77
|
+
if (pitch > 90f) {
|
|
78
|
+
pitch -= 360;
|
|
79
|
+
}
|
|
80
|
+
if (pitch <= -45f) {
|
|
81
|
+
float alpha = Mathf.Clamp01(1 - (pitch + 45f) / -40f);
|
|
82
|
+
// print($"alpha: {alpha}");
|
|
83
|
+
targetPosition = Vector3.Lerp(characterPosition, targetPosition, alpha);
|
|
84
|
+
mainDistanceMod = alpha;
|
|
85
|
+
}
|
|
62
86
|
}
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
87
|
+
// if (this.adjustToHead && yDiff > this.adjustToHeadHeightThreshold) {
|
|
88
|
+
// float alpha = 1 / yDiff / this.adjustToHeadHeightThreshold;
|
|
89
|
+
// print($"alpha: {alpha}");
|
|
90
|
+
// // targetPosition = Vector3.Lerp(characterPosition, targetPosition, alpha);
|
|
91
|
+
// // mainDistanceMod = alpha;
|
|
92
|
+
// }
|
|
93
|
+
|
|
94
|
+
// Pre: Raycast from character to target position to prevent target being in a wall
|
|
95
|
+
Debug.DrawLine(characterPosition, characterPosition + preDir * preDirDistance, Color.yellow);
|
|
96
|
+
// bool preHit = Physics.BoxCast(characterPosition, boxHalfExtents, preDir.normalized, out RaycastHit preHitInfo, t.rotation, preDir.magnitude, mask,
|
|
97
|
+
// QueryTriggerInteraction.Ignore);
|
|
98
|
+
bool preHit = Physics.Raycast(characterPosition, preDir.normalized, out RaycastHit preHitInfo, preDirDistance, mask,
|
|
99
|
+
QueryTriggerInteraction.Ignore);
|
|
100
|
+
if (preHit) {
|
|
101
|
+
GizmoUtils.DrawSphere(preHitInfo.point, 0.03f, Color.yellow);
|
|
102
|
+
targetPosition = preHitInfo.point - preDir.normalized * 0.1f;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
Vector3 newCamPos;
|
|
106
|
+
|
|
107
|
+
// Main: Raycast from target position backwards (away from character).
|
|
108
|
+
Debug.DrawLine(targetPosition, targetPosition + mainDir, Color.blue);
|
|
109
|
+
// bool mainHit = Physics.BoxCast(targetPosition - mainDir.normalized * 0.1f, boxHalfExtents, mainDir.normalized, out RaycastHit mainHitInfo,
|
|
110
|
+
// t.rotation, mainDir.magnitude + 0.05f, mask, QueryTriggerInteraction.Ignore);
|
|
111
|
+
bool mainHit = Physics.Raycast(targetPosition, mainDir.normalized, out RaycastHit mainHitInfo, mainDir.magnitude * mainDistanceMod, mask, QueryTriggerInteraction.Ignore);
|
|
112
|
+
if (mainHit) {
|
|
113
|
+
GizmoUtils.DrawSphere(mainHitInfo.point, 0.03f, Color.blue);
|
|
114
|
+
newCamPos = mainHitInfo.point - mainDir.normalized * 0.1f;
|
|
115
|
+
} else {
|
|
116
|
+
newCamPos = targetPosition + mainDir.normalized * mainDir.magnitude * mainDistanceMod;
|
|
117
|
+
GizmoUtils.DrawSphere(targetPosition + mainDir.normalized * mainDir.magnitude * mainDistanceMod, 0.03f, Color.blue);
|
|
71
118
|
}
|
|
72
119
|
|
|
73
|
-
t.position =
|
|
120
|
+
t.position = newCamPos;
|
|
74
121
|
}
|
|
75
122
|
}
|
|
76
123
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
using System;
|
|
2
|
+
using System.Collections.Concurrent;
|
|
2
3
|
using System.Collections.Generic;
|
|
3
4
|
using System.IO;
|
|
5
|
+
using System.Threading.Tasks;
|
|
4
6
|
using Airship.DevConsole;
|
|
5
7
|
using Mirror;
|
|
6
8
|
using UnityEngine;
|
|
@@ -22,6 +24,37 @@ namespace Code.RemoteConsole {
|
|
|
22
24
|
public class ServerConsole : MonoBehaviour {
|
|
23
25
|
private List<ServerConsoleBroadcast> startupMessages = new(100);
|
|
24
26
|
private const int maxStartupMessages = 100;
|
|
27
|
+
private static readonly ConcurrentQueue<string> logQueue = new();
|
|
28
|
+
|
|
29
|
+
private string logPath;
|
|
30
|
+
private string prevLogPath;
|
|
31
|
+
private StreamWriter writer;
|
|
32
|
+
|
|
33
|
+
private bool shuttingDown = false;
|
|
34
|
+
private Task writeTask;
|
|
35
|
+
|
|
36
|
+
private void Awake() {
|
|
37
|
+
writeTask = Task.Run(ProcessQueue);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
private async Task ProcessQueue() {
|
|
41
|
+
while (!shuttingDown) {
|
|
42
|
+
while (logQueue.TryDequeue(out string msg)) {
|
|
43
|
+
try {
|
|
44
|
+
await writer.WriteLineAsync(msg);
|
|
45
|
+
} catch (Exception e) {
|
|
46
|
+
Debug.LogError("ServerLogger write failed: " + e);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
await Task.Delay(1); // tune as needed
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
private void OnDestroy() {
|
|
55
|
+
shuttingDown = true;
|
|
56
|
+
// writeTask?.Wait();
|
|
57
|
+
}
|
|
25
58
|
|
|
26
59
|
/// <summary>
|
|
27
60
|
/// Called on client when client receives a remote log from server.
|
|
@@ -30,6 +63,9 @@ namespace Code.RemoteConsole {
|
|
|
30
63
|
private void OnServerConsoleBroadcast(ServerConsoleBroadcast args) {
|
|
31
64
|
if (!DevConsole.console.loggingEnabled) return;
|
|
32
65
|
DevConsole.console.OnLogMessageReceived(args.message, args.stackTrace, args.logType, LogContext.Server, args.time);
|
|
66
|
+
|
|
67
|
+
string timeStamped = $"[{DateTime.Now:HH:mm:ss}] {args.message}";
|
|
68
|
+
logQueue.Enqueue(timeStamped);
|
|
33
69
|
}
|
|
34
70
|
|
|
35
71
|
public void OnStartServer() {
|
|
@@ -48,11 +84,34 @@ namespace Code.RemoteConsole {
|
|
|
48
84
|
NetworkClient.RegisterHandler<ServerConsoleBroadcast>(OnServerConsoleBroadcast, false);
|
|
49
85
|
NetworkClient.Send(new RequestServerConsoleStartupLogs());
|
|
50
86
|
}
|
|
51
|
-
}
|
|
52
87
|
|
|
53
|
-
|
|
88
|
+
// Setup logs
|
|
54
89
|
if (RunCore.IsClient()) {
|
|
55
|
-
|
|
90
|
+
string logDir = Path.GetDirectoryName(Application.consoleLogPath);
|
|
91
|
+
logPath = Path.Combine(logDir, "Server.log");
|
|
92
|
+
prevLogPath = Path.Combine(logDir, "Server-prev.log");
|
|
93
|
+
|
|
94
|
+
// Rotate logs
|
|
95
|
+
try {
|
|
96
|
+
if (File.Exists(prevLogPath)) File.Delete(prevLogPath);
|
|
97
|
+
if (File.Exists(logPath)) File.Move(logPath, prevLogPath);
|
|
98
|
+
} catch (Exception e) {
|
|
99
|
+
Debug.LogError("Failed rotating server logs: " + e);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
if (writer != null) {
|
|
103
|
+
writer.Close();
|
|
104
|
+
}
|
|
105
|
+
writer = new StreamWriter(logPath, false); // overwrite existing
|
|
106
|
+
writer.AutoFlush = true;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
public void OnStopClient() {
|
|
111
|
+
NetworkClient.UnregisterHandler<ServerConsoleBroadcast>();
|
|
112
|
+
if (writer != null) {
|
|
113
|
+
writer.Close();
|
|
114
|
+
writer = null;
|
|
56
115
|
}
|
|
57
116
|
}
|
|
58
117
|
|
|
@@ -803,7 +803,7 @@ GameObject:
|
|
|
803
803
|
- component: {fileID: 56112848101109133}
|
|
804
804
|
- component: {fileID: 3240943467700635561}
|
|
805
805
|
m_Layer: 5
|
|
806
|
-
m_Name: Open
|
|
806
|
+
m_Name: Open Log File
|
|
807
807
|
m_TagString: Untagged
|
|
808
808
|
m_Icon: {fileID: 0}
|
|
809
809
|
m_NavMeshLayer: 0
|
|
@@ -913,7 +913,7 @@ MonoBehaviour:
|
|
|
913
913
|
m_Calls:
|
|
914
914
|
- m_Target: {fileID: 3982050654428888601}
|
|
915
915
|
m_TargetAssemblyTypeName: Airship.DevConsole.DevConsoleMono, Airship.DevConsole
|
|
916
|
-
m_MethodName:
|
|
916
|
+
m_MethodName: OpenLogFile
|
|
917
917
|
m_Mode: 1
|
|
918
918
|
m_Arguments:
|
|
919
919
|
m_ObjectArgument: {fileID: 0}
|
|
@@ -1295,6 +1295,7 @@ RectTransform:
|
|
|
1295
1295
|
- {fileID: 8092397315146610953}
|
|
1296
1296
|
- {fileID: 7701673732054800151}
|
|
1297
1297
|
- {fileID: 7939003700229423427}
|
|
1298
|
+
- {fileID: 4530286815008135231}
|
|
1298
1299
|
- {fileID: 5809969181817808214}
|
|
1299
1300
|
m_Father: {fileID: 3759786000585080057}
|
|
1300
1301
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
|
@@ -2381,6 +2382,296 @@ MonoBehaviour:
|
|
|
2381
2382
|
m_hasFontAssetChanged: 0
|
|
2382
2383
|
m_baseMaterial: {fileID: 0}
|
|
2383
2384
|
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
|
|
2385
|
+
--- !u!1 &4744913897385524904
|
|
2386
|
+
GameObject:
|
|
2387
|
+
m_ObjectHideFlags: 0
|
|
2388
|
+
m_CorrespondingSourceObject: {fileID: 0}
|
|
2389
|
+
m_PrefabInstance: {fileID: 0}
|
|
2390
|
+
m_PrefabAsset: {fileID: 0}
|
|
2391
|
+
serializedVersion: 6
|
|
2392
|
+
m_Component:
|
|
2393
|
+
- component: {fileID: 4709642870298351681}
|
|
2394
|
+
- component: {fileID: 6077599578721637249}
|
|
2395
|
+
- component: {fileID: 7575314359073941171}
|
|
2396
|
+
m_Layer: 5
|
|
2397
|
+
m_Name: Text (TMP)
|
|
2398
|
+
m_TagString: Untagged
|
|
2399
|
+
m_Icon: {fileID: 0}
|
|
2400
|
+
m_NavMeshLayer: 0
|
|
2401
|
+
m_StaticEditorFlags: 0
|
|
2402
|
+
m_IsActive: 1
|
|
2403
|
+
--- !u!224 &4709642870298351681
|
|
2404
|
+
RectTransform:
|
|
2405
|
+
m_ObjectHideFlags: 0
|
|
2406
|
+
m_CorrespondingSourceObject: {fileID: 0}
|
|
2407
|
+
m_PrefabInstance: {fileID: 0}
|
|
2408
|
+
m_PrefabAsset: {fileID: 0}
|
|
2409
|
+
m_GameObject: {fileID: 4744913897385524904}
|
|
2410
|
+
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
|
2411
|
+
m_LocalPosition: {x: 0, y: 0, z: 0}
|
|
2412
|
+
m_LocalScale: {x: 1, y: 1, z: 1}
|
|
2413
|
+
m_ConstrainProportionsScale: 0
|
|
2414
|
+
m_Children: []
|
|
2415
|
+
m_Father: {fileID: 4530286815008135231}
|
|
2416
|
+
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
|
2417
|
+
m_AnchorMin: {x: 0, y: 0}
|
|
2418
|
+
m_AnchorMax: {x: 1, y: 1}
|
|
2419
|
+
m_AnchoredPosition: {x: 0, y: 0}
|
|
2420
|
+
m_SizeDelta: {x: 0, y: 0}
|
|
2421
|
+
m_Pivot: {x: 0.5, y: 0.5}
|
|
2422
|
+
--- !u!222 &6077599578721637249
|
|
2423
|
+
CanvasRenderer:
|
|
2424
|
+
m_ObjectHideFlags: 0
|
|
2425
|
+
m_CorrespondingSourceObject: {fileID: 0}
|
|
2426
|
+
m_PrefabInstance: {fileID: 0}
|
|
2427
|
+
m_PrefabAsset: {fileID: 0}
|
|
2428
|
+
m_GameObject: {fileID: 4744913897385524904}
|
|
2429
|
+
m_CullTransparentMesh: 1
|
|
2430
|
+
--- !u!114 &7575314359073941171
|
|
2431
|
+
MonoBehaviour:
|
|
2432
|
+
m_ObjectHideFlags: 0
|
|
2433
|
+
m_CorrespondingSourceObject: {fileID: 0}
|
|
2434
|
+
m_PrefabInstance: {fileID: 0}
|
|
2435
|
+
m_PrefabAsset: {fileID: 0}
|
|
2436
|
+
m_GameObject: {fileID: 4744913897385524904}
|
|
2437
|
+
m_Enabled: 1
|
|
2438
|
+
m_EditorHideFlags: 0
|
|
2439
|
+
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
|
|
2440
|
+
m_Name:
|
|
2441
|
+
m_EditorClassIdentifier:
|
|
2442
|
+
m_Material: {fileID: 0}
|
|
2443
|
+
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
|
2444
|
+
m_RaycastTarget: 1
|
|
2445
|
+
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
|
2446
|
+
m_Maskable: 1
|
|
2447
|
+
m_OnCullStateChanged:
|
|
2448
|
+
m_PersistentCalls:
|
|
2449
|
+
m_Calls: []
|
|
2450
|
+
m_text: logs folder
|
|
2451
|
+
m_isRightToLeft: 0
|
|
2452
|
+
m_fontAsset: {fileID: 11400000, guid: f0ce55d58d63e4deab29e7ad50308632, type: 2}
|
|
2453
|
+
m_sharedMaterial: {fileID: 813049023685960433, guid: f0ce55d58d63e4deab29e7ad50308632, type: 2}
|
|
2454
|
+
m_fontSharedMaterials: []
|
|
2455
|
+
m_fontMaterial: {fileID: 0}
|
|
2456
|
+
m_fontMaterials: []
|
|
2457
|
+
m_fontColor32:
|
|
2458
|
+
serializedVersion: 2
|
|
2459
|
+
rgba: 4286347897
|
|
2460
|
+
m_fontColor: {r: 0.4745098, g: 0.47843137, b: 0.4862745, a: 1}
|
|
2461
|
+
m_enableVertexGradient: 0
|
|
2462
|
+
m_colorMode: 3
|
|
2463
|
+
m_fontColorGradient:
|
|
2464
|
+
topLeft: {r: 1, g: 1, b: 1, a: 1}
|
|
2465
|
+
topRight: {r: 1, g: 1, b: 1, a: 1}
|
|
2466
|
+
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
|
|
2467
|
+
bottomRight: {r: 1, g: 1, b: 1, a: 1}
|
|
2468
|
+
m_fontColorGradientPreset: {fileID: 0}
|
|
2469
|
+
m_spriteAsset: {fileID: 0}
|
|
2470
|
+
m_tintAllSprites: 0
|
|
2471
|
+
m_StyleSheet: {fileID: 0}
|
|
2472
|
+
m_TextStyleHashCode: -1183493901
|
|
2473
|
+
m_overrideHtmlColors: 0
|
|
2474
|
+
m_faceColor:
|
|
2475
|
+
serializedVersion: 2
|
|
2476
|
+
rgba: 4294967295
|
|
2477
|
+
m_fontSize: 16
|
|
2478
|
+
m_fontSizeBase: 16
|
|
2479
|
+
m_fontWeight: 400
|
|
2480
|
+
m_enableAutoSizing: 0
|
|
2481
|
+
m_fontSizeMin: 18
|
|
2482
|
+
m_fontSizeMax: 72
|
|
2483
|
+
m_fontStyle: 0
|
|
2484
|
+
m_HorizontalAlignment: 2
|
|
2485
|
+
m_VerticalAlignment: 512
|
|
2486
|
+
m_textAlignment: 65535
|
|
2487
|
+
m_characterSpacing: 0
|
|
2488
|
+
m_wordSpacing: 0
|
|
2489
|
+
m_lineSpacing: 0
|
|
2490
|
+
m_lineSpacingMax: 0
|
|
2491
|
+
m_paragraphSpacing: 0
|
|
2492
|
+
m_charWidthMaxAdj: 0
|
|
2493
|
+
m_TextWrappingMode: 1
|
|
2494
|
+
m_wordWrappingRatios: 0.4
|
|
2495
|
+
m_overflowMode: 0
|
|
2496
|
+
m_linkedTextComponent: {fileID: 0}
|
|
2497
|
+
parentLinkedComponent: {fileID: 0}
|
|
2498
|
+
m_enableKerning: 1
|
|
2499
|
+
m_ActiveFontFeatures: 6e72656b
|
|
2500
|
+
m_enableExtraPadding: 0
|
|
2501
|
+
checkPaddingRequired: 0
|
|
2502
|
+
m_isRichText: 1
|
|
2503
|
+
m_EmojiFallbackSupport: 1
|
|
2504
|
+
m_parseCtrlCharacters: 1
|
|
2505
|
+
m_isOrthographic: 1
|
|
2506
|
+
m_isCullingEnabled: 0
|
|
2507
|
+
m_horizontalMapping: 0
|
|
2508
|
+
m_verticalMapping: 0
|
|
2509
|
+
m_uvLineOffset: 0
|
|
2510
|
+
m_geometrySortingOrder: 0
|
|
2511
|
+
m_IsTextObjectScaleStatic: 0
|
|
2512
|
+
m_VertexBufferAutoSizeReduction: 0
|
|
2513
|
+
m_useMaxVisibleDescender: 1
|
|
2514
|
+
m_pageToDisplay: 1
|
|
2515
|
+
m_margin: {x: 0, y: 0, z: 0, w: 0}
|
|
2516
|
+
m_isUsingLegacyAnimationComponent: 0
|
|
2517
|
+
m_isVolumetricText: 0
|
|
2518
|
+
m_hasFontAssetChanged: 0
|
|
2519
|
+
m_baseMaterial: {fileID: 0}
|
|
2520
|
+
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
|
|
2521
|
+
--- !u!1 &4760469188689381895
|
|
2522
|
+
GameObject:
|
|
2523
|
+
m_ObjectHideFlags: 0
|
|
2524
|
+
m_CorrespondingSourceObject: {fileID: 0}
|
|
2525
|
+
m_PrefabInstance: {fileID: 0}
|
|
2526
|
+
m_PrefabAsset: {fileID: 0}
|
|
2527
|
+
serializedVersion: 6
|
|
2528
|
+
m_Component:
|
|
2529
|
+
- component: {fileID: 4530286815008135231}
|
|
2530
|
+
- component: {fileID: 6181255657044284937}
|
|
2531
|
+
- component: {fileID: 9157831501577403143}
|
|
2532
|
+
- component: {fileID: 7521334484405692678}
|
|
2533
|
+
- component: {fileID: 7281604502400521234}
|
|
2534
|
+
m_Layer: 5
|
|
2535
|
+
m_Name: Open Logs Folder
|
|
2536
|
+
m_TagString: Untagged
|
|
2537
|
+
m_Icon: {fileID: 0}
|
|
2538
|
+
m_NavMeshLayer: 0
|
|
2539
|
+
m_StaticEditorFlags: 0
|
|
2540
|
+
m_IsActive: 1
|
|
2541
|
+
--- !u!224 &4530286815008135231
|
|
2542
|
+
RectTransform:
|
|
2543
|
+
m_ObjectHideFlags: 0
|
|
2544
|
+
m_CorrespondingSourceObject: {fileID: 0}
|
|
2545
|
+
m_PrefabInstance: {fileID: 0}
|
|
2546
|
+
m_PrefabAsset: {fileID: 0}
|
|
2547
|
+
m_GameObject: {fileID: 4760469188689381895}
|
|
2548
|
+
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
|
2549
|
+
m_LocalPosition: {x: 0, y: 0, z: 0}
|
|
2550
|
+
m_LocalScale: {x: 1, y: 1, z: 1}
|
|
2551
|
+
m_ConstrainProportionsScale: 0
|
|
2552
|
+
m_Children:
|
|
2553
|
+
- {fileID: 4709642870298351681}
|
|
2554
|
+
m_Father: {fileID: 1304341277271108516}
|
|
2555
|
+
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
|
2556
|
+
m_AnchorMin: {x: 0, y: 0}
|
|
2557
|
+
m_AnchorMax: {x: 0, y: 0}
|
|
2558
|
+
m_AnchoredPosition: {x: 0, y: 0}
|
|
2559
|
+
m_SizeDelta: {x: 0, y: 36}
|
|
2560
|
+
m_Pivot: {x: 0.5, y: 0.5}
|
|
2561
|
+
--- !u!222 &6181255657044284937
|
|
2562
|
+
CanvasRenderer:
|
|
2563
|
+
m_ObjectHideFlags: 0
|
|
2564
|
+
m_CorrespondingSourceObject: {fileID: 0}
|
|
2565
|
+
m_PrefabInstance: {fileID: 0}
|
|
2566
|
+
m_PrefabAsset: {fileID: 0}
|
|
2567
|
+
m_GameObject: {fileID: 4760469188689381895}
|
|
2568
|
+
m_CullTransparentMesh: 1
|
|
2569
|
+
--- !u!114 &9157831501577403143
|
|
2570
|
+
MonoBehaviour:
|
|
2571
|
+
m_ObjectHideFlags: 0
|
|
2572
|
+
m_CorrespondingSourceObject: {fileID: 0}
|
|
2573
|
+
m_PrefabInstance: {fileID: 0}
|
|
2574
|
+
m_PrefabAsset: {fileID: 0}
|
|
2575
|
+
m_GameObject: {fileID: 4760469188689381895}
|
|
2576
|
+
m_Enabled: 1
|
|
2577
|
+
m_EditorHideFlags: 0
|
|
2578
|
+
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
|
2579
|
+
m_Name:
|
|
2580
|
+
m_EditorClassIdentifier:
|
|
2581
|
+
m_Material: {fileID: 0}
|
|
2582
|
+
m_Color: {r: 0.19607843, g: 0.20784314, b: 0.21568628, a: 1}
|
|
2583
|
+
m_RaycastTarget: 1
|
|
2584
|
+
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
|
2585
|
+
m_Maskable: 1
|
|
2586
|
+
m_OnCullStateChanged:
|
|
2587
|
+
m_PersistentCalls:
|
|
2588
|
+
m_Calls: []
|
|
2589
|
+
m_Sprite: {fileID: 0}
|
|
2590
|
+
m_Type: 1
|
|
2591
|
+
m_PreserveAspect: 0
|
|
2592
|
+
m_FillCenter: 1
|
|
2593
|
+
m_FillMethod: 4
|
|
2594
|
+
m_FillAmount: 1
|
|
2595
|
+
m_FillClockwise: 1
|
|
2596
|
+
m_FillOrigin: 0
|
|
2597
|
+
m_UseSpriteMesh: 0
|
|
2598
|
+
m_PixelsPerUnitMultiplier: 1
|
|
2599
|
+
--- !u!114 &7521334484405692678
|
|
2600
|
+
MonoBehaviour:
|
|
2601
|
+
m_ObjectHideFlags: 0
|
|
2602
|
+
m_CorrespondingSourceObject: {fileID: 0}
|
|
2603
|
+
m_PrefabInstance: {fileID: 0}
|
|
2604
|
+
m_PrefabAsset: {fileID: 0}
|
|
2605
|
+
m_GameObject: {fileID: 4760469188689381895}
|
|
2606
|
+
m_Enabled: 1
|
|
2607
|
+
m_EditorHideFlags: 0
|
|
2608
|
+
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
|
|
2609
|
+
m_Name:
|
|
2610
|
+
m_EditorClassIdentifier:
|
|
2611
|
+
m_Navigation:
|
|
2612
|
+
m_Mode: 3
|
|
2613
|
+
m_WrapAround: 0
|
|
2614
|
+
m_SelectOnUp: {fileID: 0}
|
|
2615
|
+
m_SelectOnDown: {fileID: 0}
|
|
2616
|
+
m_SelectOnLeft: {fileID: 0}
|
|
2617
|
+
m_SelectOnRight: {fileID: 0}
|
|
2618
|
+
m_Transition: 1
|
|
2619
|
+
m_Colors:
|
|
2620
|
+
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
|
|
2621
|
+
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
|
|
2622
|
+
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
|
|
2623
|
+
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
|
|
2624
|
+
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
|
|
2625
|
+
m_ColorMultiplier: 1
|
|
2626
|
+
m_FadeDuration: 0.1
|
|
2627
|
+
m_SpriteState:
|
|
2628
|
+
m_HighlightedSprite: {fileID: 0}
|
|
2629
|
+
m_PressedSprite: {fileID: 0}
|
|
2630
|
+
m_SelectedSprite: {fileID: 0}
|
|
2631
|
+
m_DisabledSprite: {fileID: 0}
|
|
2632
|
+
m_AnimationTriggers:
|
|
2633
|
+
m_NormalTrigger: Normal
|
|
2634
|
+
m_HighlightedTrigger: Highlighted
|
|
2635
|
+
m_PressedTrigger: Pressed
|
|
2636
|
+
m_SelectedTrigger: Selected
|
|
2637
|
+
m_DisabledTrigger: Disabled
|
|
2638
|
+
m_Interactable: 1
|
|
2639
|
+
m_TargetGraphic: {fileID: 9157831501577403143}
|
|
2640
|
+
m_OnClick:
|
|
2641
|
+
m_PersistentCalls:
|
|
2642
|
+
m_Calls:
|
|
2643
|
+
- m_Target: {fileID: 3982050654428888601}
|
|
2644
|
+
m_TargetAssemblyTypeName: Airship.DevConsole.DevConsoleMono, Airship.DevConsole
|
|
2645
|
+
m_MethodName: OpenLogsFolder
|
|
2646
|
+
m_Mode: 1
|
|
2647
|
+
m_Arguments:
|
|
2648
|
+
m_ObjectArgument: {fileID: 0}
|
|
2649
|
+
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
|
|
2650
|
+
m_IntArgument: 0
|
|
2651
|
+
m_FloatArgument: 0
|
|
2652
|
+
m_StringArgument:
|
|
2653
|
+
m_BoolArgument: 0
|
|
2654
|
+
m_CallState: 2
|
|
2655
|
+
--- !u!114 &7281604502400521234
|
|
2656
|
+
MonoBehaviour:
|
|
2657
|
+
m_ObjectHideFlags: 0
|
|
2658
|
+
m_CorrespondingSourceObject: {fileID: 0}
|
|
2659
|
+
m_PrefabInstance: {fileID: 0}
|
|
2660
|
+
m_PrefabAsset: {fileID: 0}
|
|
2661
|
+
m_GameObject: {fileID: 4760469188689381895}
|
|
2662
|
+
m_Enabled: 1
|
|
2663
|
+
m_EditorHideFlags: 0
|
|
2664
|
+
m_Script: {fileID: 11500000, guid: 306cc8c2b49d7114eaa3623786fc2126, type: 3}
|
|
2665
|
+
m_Name:
|
|
2666
|
+
m_EditorClassIdentifier:
|
|
2667
|
+
m_IgnoreLayout: 0
|
|
2668
|
+
m_MinWidth: -1
|
|
2669
|
+
m_MinHeight: -1
|
|
2670
|
+
m_PreferredWidth: 95
|
|
2671
|
+
m_PreferredHeight: -1
|
|
2672
|
+
m_FlexibleWidth: -1
|
|
2673
|
+
m_FlexibleHeight: -1
|
|
2674
|
+
m_LayoutPriority: 1
|
|
2384
2675
|
--- !u!1 &5039477158916393225
|
|
2385
2676
|
GameObject:
|
|
2386
2677
|
m_ObjectHideFlags: 0
|
|
@@ -682,12 +682,17 @@ namespace Airship.DevConsole
|
|
|
682
682
|
DevConsole.InvokeOnConsoleClosed();
|
|
683
683
|
}
|
|
684
684
|
|
|
685
|
-
public void
|
|
685
|
+
public void OpenLogFile() {
|
|
686
686
|
var path = Application.consoleLogPath;
|
|
687
687
|
print("Opening console log path: " + path);
|
|
688
688
|
CrossPlatformFileAPI.OpenPath(path);
|
|
689
689
|
}
|
|
690
690
|
|
|
691
|
+
public void OpenLogsFolder() {
|
|
692
|
+
var path = Path.GetDirectoryName(Application.consoleLogPath);
|
|
693
|
+
CrossPlatformFileAPI.OpenPath(path);
|
|
694
|
+
}
|
|
695
|
+
|
|
691
696
|
public void OpenProfilesFolder() {
|
|
692
697
|
var path = Path.Combine(Application.persistentDataPath, "ClientProfiles");
|
|
693
698
|
if (!Directory.Exists(path)) {
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -10,7 +10,7 @@ MonoBehaviour:
|
|
|
10
10
|
m_Enabled: 1
|
|
11
11
|
m_EditorHideFlags: 0
|
|
12
12
|
m_Script: {fileID: 11500000, guid: bf2edee5c58d82540a51f03df9d42094, type: 3}
|
|
13
|
-
m_Name:
|
|
13
|
+
m_Name: AirshipURPAsset
|
|
14
14
|
m_EditorClassIdentifier:
|
|
15
15
|
k_AssetVersion: 12
|
|
16
16
|
k_AssetPreviousVersion: 12
|
|
@@ -59,7 +59,7 @@ MonoBehaviour:
|
|
|
59
59
|
m_Cascade3Split: {x: 0.1, y: 0.3}
|
|
60
60
|
m_Cascade4Split: {x: 0.067, y: 0.2, z: 0.467}
|
|
61
61
|
m_CascadeBorder: 0.65
|
|
62
|
-
m_ShadowDepthBias:
|
|
62
|
+
m_ShadowDepthBias: 1
|
|
63
63
|
m_ShadowNormalBias: 0
|
|
64
64
|
m_AnyShadowsSupported: 1
|
|
65
65
|
m_SoftShadowsSupported: 1
|
package/package.json
CHANGED
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
%YAML 1.1
|
|
2
|
-
%TAG !u! tag:unity3d.com,2011:
|
|
3
|
-
--- !u!114 &11400000
|
|
4
|
-
MonoBehaviour:
|
|
5
|
-
m_ObjectHideFlags: 0
|
|
6
|
-
m_CorrespondingSourceObject: {fileID: 0}
|
|
7
|
-
m_PrefabInstance: {fileID: 0}
|
|
8
|
-
m_PrefabAsset: {fileID: 0}
|
|
9
|
-
m_GameObject: {fileID: 0}
|
|
10
|
-
m_Enabled: 1
|
|
11
|
-
m_EditorHideFlags: 0
|
|
12
|
-
m_Script: {fileID: 11500000, guid: bf2edee5c58d82540a51f03df9d42094, type: 3}
|
|
13
|
-
m_Name: AirshipURPAssetRealtime
|
|
14
|
-
m_EditorClassIdentifier:
|
|
15
|
-
k_AssetVersion: 12
|
|
16
|
-
k_AssetPreviousVersion: 12
|
|
17
|
-
m_RendererType: 1
|
|
18
|
-
m_RendererData: {fileID: 0}
|
|
19
|
-
m_RendererDataList:
|
|
20
|
-
- {fileID: 11400000, guid: fd1b4d11df5dd4a378ed9d33fdae2dbf, type: 2}
|
|
21
|
-
m_DefaultRendererIndex: 0
|
|
22
|
-
m_RequireDepthTexture: 0
|
|
23
|
-
m_RequireOpaqueTexture: 0
|
|
24
|
-
m_OpaqueDownsampling: 1
|
|
25
|
-
m_SupportsTerrainHoles: 1
|
|
26
|
-
m_SupportsHDR: 1
|
|
27
|
-
m_HDRColorBufferPrecision: 0
|
|
28
|
-
m_MSAA: 1
|
|
29
|
-
m_RenderScale: 1
|
|
30
|
-
m_UpscalingFilter: 0
|
|
31
|
-
m_FsrOverrideSharpness: 0
|
|
32
|
-
m_FsrSharpness: 0.92
|
|
33
|
-
m_EnableLODCrossFade: 1
|
|
34
|
-
m_LODCrossFadeDitheringType: 1
|
|
35
|
-
m_ShEvalMode: 0
|
|
36
|
-
m_LightProbeSystem: 0
|
|
37
|
-
m_ProbeVolumeMemoryBudget: 1024
|
|
38
|
-
m_SupportProbeVolumeStreaming: 0
|
|
39
|
-
m_ProbeVolumeSHBands: 1
|
|
40
|
-
m_MainLightRenderingMode: 1
|
|
41
|
-
m_MainLightShadowsSupported: 1
|
|
42
|
-
m_MainLightShadowmapResolution: 2048
|
|
43
|
-
m_AdditionalLightsRenderingMode: 1
|
|
44
|
-
m_AdditionalLightsPerObjectLimit: 4
|
|
45
|
-
m_AdditionalLightShadowsSupported: 1
|
|
46
|
-
m_AdditionalLightsShadowmapResolution: 2048
|
|
47
|
-
m_AdditionalLightsShadowResolutionTierLow: 256
|
|
48
|
-
m_AdditionalLightsShadowResolutionTierMedium: 512
|
|
49
|
-
m_AdditionalLightsShadowResolutionTierHigh: 1024
|
|
50
|
-
m_ReflectionProbeBlending: 0
|
|
51
|
-
m_ReflectionProbeBoxProjection: 0
|
|
52
|
-
m_ShadowDistance: 150
|
|
53
|
-
m_ShadowCascadeCount: 2
|
|
54
|
-
m_Cascade2Split: 0.25
|
|
55
|
-
m_Cascade3Split: {x: 0.1, y: 0.3}
|
|
56
|
-
m_Cascade4Split: {x: 0.067, y: 0.2, z: 0.467}
|
|
57
|
-
m_CascadeBorder: 0
|
|
58
|
-
m_ShadowDepthBias: 0.1
|
|
59
|
-
m_ShadowNormalBias: 0.1
|
|
60
|
-
m_AnyShadowsSupported: 1
|
|
61
|
-
m_SoftShadowsSupported: 1
|
|
62
|
-
m_ConservativeEnclosingSphere: 1
|
|
63
|
-
m_NumIterationsEnclosingSphere: 64
|
|
64
|
-
m_SoftShadowQuality: 2
|
|
65
|
-
m_AdditionalLightsCookieResolution: 2048
|
|
66
|
-
m_AdditionalLightsCookieFormat: 3
|
|
67
|
-
m_UseSRPBatcher: 1
|
|
68
|
-
m_SupportsDynamicBatching: 0
|
|
69
|
-
m_MixedLightingSupported: 1
|
|
70
|
-
m_SupportsLightCookies: 1
|
|
71
|
-
m_SupportsLightLayers: 0
|
|
72
|
-
m_DebugLevel: 0
|
|
73
|
-
m_StoreActionsOptimization: 0
|
|
74
|
-
m_EnableRenderGraph: 0
|
|
75
|
-
m_UseAdaptivePerformance: 1
|
|
76
|
-
m_ColorGradingMode: 1
|
|
77
|
-
m_ColorGradingLutSize: 32
|
|
78
|
-
m_UseFastSRGBLinearConversion: 0
|
|
79
|
-
m_SupportDataDrivenLensFlare: 1
|
|
80
|
-
m_SupportScreenSpaceLensFlare: 1
|
|
81
|
-
m_ShadowType: 1
|
|
82
|
-
m_LocalShadowsSupported: 0
|
|
83
|
-
m_LocalShadowsAtlasResolution: 256
|
|
84
|
-
m_MaxPixelLights: 0
|
|
85
|
-
m_ShadowAtlasResolution: 256
|
|
86
|
-
m_VolumeFrameworkUpdateMode: 0
|
|
87
|
-
m_VolumeProfile: {fileID: 0}
|
|
88
|
-
m_Textures:
|
|
89
|
-
blueNoise64LTex: {fileID: 2800000, guid: e3d24661c1e055f45a7560c033dbb837, type: 3}
|
|
90
|
-
bayerMatrixTex: {fileID: 2800000, guid: f9ee4ed84c1d10c49aabb9b210b0fc44, type: 3}
|
|
91
|
-
apvScenesData:
|
|
92
|
-
m_ObsoleteSerializedBakingSets: []
|
|
93
|
-
sceneToBakingSet:
|
|
94
|
-
m_Keys: []
|
|
95
|
-
m_Values: []
|
|
96
|
-
bakingSets: []
|
|
97
|
-
sceneBounds:
|
|
98
|
-
m_Keys: []
|
|
99
|
-
m_Values: []
|
|
100
|
-
hasProbeVolumes:
|
|
101
|
-
m_Keys: []
|
|
102
|
-
m_Values:
|
|
103
|
-
m_PrefilteringModeMainLightShadows: 3
|
|
104
|
-
m_PrefilteringModeAdditionalLight: 3
|
|
105
|
-
m_PrefilteringModeAdditionalLightShadows: 2
|
|
106
|
-
m_PrefilterXRKeywords: 1
|
|
107
|
-
m_PrefilteringModeForwardPlus: 0
|
|
108
|
-
m_PrefilteringModeDeferredRendering: 0
|
|
109
|
-
m_PrefilteringModeScreenSpaceOcclusion: 0
|
|
110
|
-
m_PrefilterDebugKeywords: 1
|
|
111
|
-
m_PrefilterWriteRenderingLayers: 1
|
|
112
|
-
m_PrefilterHDROutput: 1
|
|
113
|
-
m_PrefilterSSAODepthNormals: 1
|
|
114
|
-
m_PrefilterSSAOSourceDepthLow: 1
|
|
115
|
-
m_PrefilterSSAOSourceDepthMedium: 1
|
|
116
|
-
m_PrefilterSSAOSourceDepthHigh: 1
|
|
117
|
-
m_PrefilterSSAOInterleaved: 1
|
|
118
|
-
m_PrefilterSSAOBlueNoise: 1
|
|
119
|
-
m_PrefilterSSAOSampleCountLow: 1
|
|
120
|
-
m_PrefilterSSAOSampleCountMedium: 1
|
|
121
|
-
m_PrefilterSSAOSampleCountHigh: 1
|
|
122
|
-
m_PrefilterDBufferMRT1: 1
|
|
123
|
-
m_PrefilterDBufferMRT2: 1
|
|
124
|
-
m_PrefilterDBufferMRT3: 0
|
|
125
|
-
m_PrefilterSoftShadowsQualityLow: 1
|
|
126
|
-
m_PrefilterSoftShadowsQualityMedium: 1
|
|
127
|
-
m_PrefilterSoftShadowsQualityHigh: 1
|
|
128
|
-
m_PrefilterSoftShadows: 0
|
|
129
|
-
m_PrefilterScreenCoord: 1
|
|
130
|
-
m_PrefilterNativeRenderPass: 1
|
|
131
|
-
m_ShaderVariantLogLevel: 0
|
|
132
|
-
m_ShadowCascades: 0
|
|
File without changes
|