gg.easy.airship 0.1.2122 → 0.1.2124
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 +16 -6
- package/Editor/Packages/AirshipPackagesWindow.cs +5 -3
- package/Runtime/Code/Components/EditorScreenShotTool.cs +9 -9
- package/Runtime/Code/Components/EditorScreenShotToolEditor.cs +25 -0
- package/Runtime/Code/Components/EditorScreenShotToolEditor.cs.meta +3 -0
- package/Runtime/Code/Player/Accessories/AccessorySlot.cs +5 -1
- package/Runtime/Code/Player/Character/CharacterRig.cs +14 -1
- package/Runtime/Code/Player/Character/MovementSystem/CharacterMovement.cs +9 -4
- package/Runtime/DevConsole/Runtime/DevConsoleMono.cs +10 -4
- package/package.json +1 -1
|
@@ -311,14 +311,24 @@ public static class CreateAssetBundles {
|
|
|
311
311
|
foreach (var assetBundleFile in AirshipPackagesWindow.assetBundleFiles) {
|
|
312
312
|
var assetBundleName = assetBundleFile.ToLower();
|
|
313
313
|
if (assetBundleName == "shared/scenes") {
|
|
314
|
-
|
|
315
|
-
.Select((s) => AssetDatabase.GetAssetPath((SceneAsset)s))
|
|
314
|
+
var assetGuids = gameConfig.gameScenes
|
|
315
|
+
.Select((s) => AssetDatabase.GetAssetPath((SceneAsset)s)).ToHashSet();
|
|
316
|
+
|
|
317
|
+
var explicitlyAddedPaths = AssetDatabase.GetAssetPathsFromAssetBundle("scenes");
|
|
318
|
+
Debug.Log($"Found {explicitlyAddedPaths.Length} explicit assets for scenes bundle.");
|
|
319
|
+
foreach (var path in explicitlyAddedPaths) {
|
|
320
|
+
// Debug.Log(" - " + path);
|
|
321
|
+
assetGuids.Add(AssetDatabase.AssetPathToGUID(path));
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
string[] assetPaths = assetGuids
|
|
316
325
|
.Where((path) => !(path.EndsWith(".lua") || path.EndsWith(".json~")))
|
|
317
326
|
.ToArray();
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
327
|
+
Debug.Log("Including assets in scenes bundle:");
|
|
328
|
+
foreach (var p in assetPaths) {
|
|
329
|
+
Debug.Log(" - " + p);
|
|
330
|
+
}
|
|
331
|
+
|
|
322
332
|
var addressableNames = assetPaths.Select((p) => p.ToLower())
|
|
323
333
|
.ToArray();
|
|
324
334
|
var build = new AssetBundleBuild() {
|
|
@@ -395,9 +395,11 @@ namespace Editor.Packages {
|
|
|
395
395
|
|
|
396
396
|
// Uncomment to just build iOS
|
|
397
397
|
if (isCoreMaterials) {
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
398
|
+
// platforms.Clear();
|
|
399
|
+
// platforms.Add(AirshipPlatform.iOS);
|
|
400
|
+
// platforms.Add(AirshipPlatform.Android);
|
|
401
|
+
platforms.Add(AirshipPlatform.Windows);
|
|
402
|
+
platforms.Add(AirshipPlatform.Mac);
|
|
401
403
|
}
|
|
402
404
|
|
|
403
405
|
if (!CreateAssetBundles.PrePublishChecks()) {
|
|
@@ -27,23 +27,23 @@ namespace Code.Components {
|
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
private void Update(){
|
|
30
|
-
if(Input.GetMouseButtonDown(0)) { // capture screen shot on left mouse button down
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
}
|
|
30
|
+
// if(Input.GetMouseButtonDown(0)) { // capture screen shot on left mouse button down
|
|
31
|
+
// if(transparentBackground){
|
|
32
|
+
// TakeScreenshotRenderTransparent();
|
|
33
|
+
// } else{
|
|
34
|
+
// TakeScreenshotRender();
|
|
35
|
+
// }
|
|
36
|
+
// }
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
-
public void TakeScreenshotRender(){
|
|
39
|
+
public void TakeScreenshotRender() {
|
|
40
40
|
var folderPath = CreateFolder();
|
|
41
41
|
var screenshotName = GetFileName();
|
|
42
42
|
ScreenCapture.CaptureScreenshot(Path.Combine(folderPath, screenshotName), superScaleSize); // takes the sceenshot, the "2" is for the scaled resolution, you can put this to 600 but it will take really long to scale the image up
|
|
43
43
|
Debug.Log("Saved screenshot to: " + folderPath + screenshotName); // You get instant feedback in the console
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
-
public void TakeScreenshotRenderTransparent(){
|
|
46
|
+
public void TakeScreenshotRenderTransparent() {
|
|
47
47
|
var folderPath = CreateFolder();
|
|
48
48
|
var screenshotName = GetFileName();
|
|
49
49
|
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
#if UNITY_EDITOR
|
|
2
|
+
using UnityEditor;
|
|
3
|
+
using UnityEngine;
|
|
4
|
+
|
|
5
|
+
namespace Code.Components {
|
|
6
|
+
[CustomEditor(typeof(EditorScreenShotTool))]
|
|
7
|
+
public class EditorScreenShotToolEditor : Editor {
|
|
8
|
+
public override void OnInspectorGUI() {
|
|
9
|
+
// Draw default inspector first
|
|
10
|
+
DrawDefaultInspector();
|
|
11
|
+
|
|
12
|
+
EditorScreenShotTool tool = (EditorScreenShotTool)target;
|
|
13
|
+
|
|
14
|
+
GUILayout.Space(10);
|
|
15
|
+
if (GUILayout.Button("Take Screenshot")) {
|
|
16
|
+
if (tool.transparentBackground) {
|
|
17
|
+
tool.TakeScreenshotRenderTransparent();
|
|
18
|
+
} else {
|
|
19
|
+
tool.TakeScreenshotRender();
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
#endif
|
|
@@ -57,8 +57,13 @@ public class CharacterRig : MonoBehaviour {
|
|
|
57
57
|
public Transform headTop;
|
|
58
58
|
public Transform neck;
|
|
59
59
|
public Transform spineChest;
|
|
60
|
-
|
|
60
|
+
public Transform chestBack;
|
|
61
|
+
public Transform chestFront;
|
|
62
|
+
public Transform heldItemL;
|
|
61
63
|
public Transform heldItemR;
|
|
64
|
+
public Transform shoulderItemL;
|
|
65
|
+
public Transform shoulderItemR;
|
|
66
|
+
|
|
62
67
|
|
|
63
68
|
[Header("Color")] public MaterialColorURP headColor;
|
|
64
69
|
public MaterialColorURP bodyColor;
|
|
@@ -99,6 +104,10 @@ public class CharacterRig : MonoBehaviour {
|
|
|
99
104
|
|
|
100
105
|
//TORSO
|
|
101
106
|
case AccessorySlot.Torso:
|
|
107
|
+
case AccessorySlot.FrontChest:
|
|
108
|
+
return chestFront;
|
|
109
|
+
case AccessorySlot.BackChest:
|
|
110
|
+
return chestBack;
|
|
102
111
|
case AccessorySlot.TorsoInner:
|
|
103
112
|
case AccessorySlot.TorsoOuter:
|
|
104
113
|
return spine;
|
|
@@ -119,6 +128,10 @@ public class CharacterRig : MonoBehaviour {
|
|
|
119
128
|
return upperArmL;
|
|
120
129
|
case AccessorySlot.LeftArmLower:
|
|
121
130
|
return forearmL;
|
|
131
|
+
case AccessorySlot.LeftShoulder:
|
|
132
|
+
return shoulderItemL;
|
|
133
|
+
case AccessorySlot.RightShoulder:
|
|
134
|
+
return shoulderItemR;
|
|
122
135
|
case AccessorySlot.RightArmUpper:
|
|
123
136
|
return upperArmR;
|
|
124
137
|
case AccessorySlot.RightArmLower:
|
|
@@ -447,7 +447,12 @@ public class CharacterMovement : NetworkBehaviour {
|
|
|
447
447
|
currentMoveState.jumpCount = 0;
|
|
448
448
|
currentMoveState.timeSinceBecameGrounded = 0f;
|
|
449
449
|
OnImpactWithGround?.Invoke(currentVelocity, groundHit);
|
|
450
|
-
|
|
450
|
+
if (isClientOnly) {
|
|
451
|
+
CommandImpactWithGround(currentVelocity, groundHit);
|
|
452
|
+
}
|
|
453
|
+
else {
|
|
454
|
+
RpcImpactWithGround(currentVelocity, groundHit);
|
|
455
|
+
}
|
|
451
456
|
} else {
|
|
452
457
|
currentMoveState.timeSinceBecameGrounded
|
|
453
458
|
= Math.Min(currentMoveState.timeSinceBecameGrounded + deltaTime, 100f);
|
|
@@ -853,8 +858,8 @@ public class CharacterMovement : NetworkBehaviour {
|
|
|
853
858
|
//Push the character out of any colliders
|
|
854
859
|
flatVelocity
|
|
855
860
|
= Vector3.ClampMagnitude(newVelocity, forwardHit.distance - characterRadius - forwardMargin);
|
|
856
|
-
newVelocity.x
|
|
857
|
-
newVelocity.z
|
|
861
|
+
newVelocity.x += flatVelocity.x;
|
|
862
|
+
newVelocity.z += flatVelocity.z;
|
|
858
863
|
}
|
|
859
864
|
|
|
860
865
|
if (!grounded && detectedGround) {
|
|
@@ -1429,4 +1434,4 @@ public class CharacterMovement : NetworkBehaviour {
|
|
|
1429
1434
|
{
|
|
1430
1435
|
OnJumped?.Invoke(jumpVelocity);
|
|
1431
1436
|
}
|
|
1432
|
-
}
|
|
1437
|
+
}
|
|
@@ -950,6 +950,11 @@ namespace Airship.DevConsole
|
|
|
950
950
|
|
|
951
951
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
952
952
|
internal void Log(object message, LogContext context = LogContext.Client, bool prepend = false) {
|
|
953
|
+
string s = message.ToString();
|
|
954
|
+
if (s.Contains("The character with Unicode value")) {
|
|
955
|
+
return;
|
|
956
|
+
}
|
|
957
|
+
|
|
953
958
|
Profiler.BeginSample("DevConsole.Log");
|
|
954
959
|
var list = StoredLogText[context];
|
|
955
960
|
if (list.Count >= 100) {
|
|
@@ -994,10 +999,6 @@ namespace Airship.DevConsole
|
|
|
994
999
|
|
|
995
1000
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
996
1001
|
internal void LogWarning(object message, LogContext context = LogContext.Client, bool prepend = false) {
|
|
997
|
-
string s = message.ToString();
|
|
998
|
-
if (s.Contains("The character with Unicode value ")) {
|
|
999
|
-
return;
|
|
1000
|
-
}
|
|
1001
1002
|
Log(message, context, prepend, WarningColour);
|
|
1002
1003
|
}
|
|
1003
1004
|
|
|
@@ -2955,6 +2956,11 @@ namespace Airship.DevConsole
|
|
|
2955
2956
|
));
|
|
2956
2957
|
|
|
2957
2958
|
#endregion
|
|
2959
|
+
|
|
2960
|
+
AddCommand(Command.Create("lighting", "", "View lighting data", () => {
|
|
2961
|
+
Debug.Log("Lightmaps: " + LightmapSettings.lightmaps.Length);
|
|
2962
|
+
Debug.Log("Probes: " + LightmapSettings.lightProbes?.count);
|
|
2963
|
+
}));
|
|
2958
2964
|
}
|
|
2959
2965
|
|
|
2960
2966
|
/// <summary>
|