Add stamina handling to player script

This commit is contained in:
Nico 2025-07-07 00:05:12 -07:00
parent 67aa38b5d2
commit bedea8c099
2 changed files with 173 additions and 161 deletions

View File

@ -1,4 +1,5 @@
using System.Collections;
using System.Data;
using System.Linq;
using UnityEditor;
using UnityEngine;
@ -22,6 +23,13 @@ public class Player : MonoBehaviour {
[SerializeField] private MeleeFighterClass FighterClass;
public AttackAnimatorFactory AttackAnimator;
[Header("Stamina")]
[SerializeField] public float StaminaMax = 100;
[SerializeField] public float Stamina = 0;
[SerializeField] public float StaminaRegenPerSecond = 5;
[SerializeField] public Slider StaminaSliderHud;
[Header("Movement Attributes")]
[SerializeField] public float MoveSpeed = 8;
[SerializeField] public float MoveSpeedDampener = 1;
@ -49,22 +57,18 @@ public class Player : MonoBehaviour {
public Vector2 PrevDirection = Vector2.zero;
private Vector2 MoveDirection = Vector2.zero;
private Vector2 DashDirection = Vector2.zero;
private Directions FaceDir = Directions.Down;
public bool IsJumping { get; set; }
public float LastJumpTime { get; private set; }
public Coroutine CoroutineJumpReset { get; private set; }
public bool ActionAfterJumpReady {
get {
return (!IsJumping || (Time.time - LastJumpTime > 0.07f));
return (!IsJumping || (Time.time - LastJumpTime > 0.03f));
}
}
public bool IsDashing { get; private set; }
public float DashTime { get; private set; }
public bool CanDash { get; private set; } = true;
public Vector2 DriftDirection { get; private set; } = Vector2.zero;
private float Drift = 0;
public bool SkillInUse = false;
private enum Directions { Left, Right, Up, Down }
@ -77,12 +81,14 @@ public class Player : MonoBehaviour {
FighterClass = new MeleeFighterClass(this);
VfxShockwavePool = new GameObjectPool(VfxShockwave, 5, 5);
BoxColliders = GetComponentsInChildren<BoxCollider2D>();
StaminaSliderHud.maxValue = StaminaMax;
SetClass(1);
}
private void Update() {
KeyPressActions();
GatherInput();
UpdatePlayerStatus();
ActiveClass.Tick();
}
@ -114,63 +120,15 @@ public class Player : MonoBehaviour {
private void DoDash() {
if (!CanDash) return;
if (!ActionAfterJumpReady) return;
if (Stamina < 25) return;
Stamina -= 25;
CanDash = false;
IsDashing = true;
DashDirection = MoveDirection.normalized;
if (DashDirection == Vector2.zero) return;
DashSpeed = DashSpeedInitial;
//StartCoroutine(DoDash(MoveDirection));
}
private void Dash(Vector2 direction) {
if (direction == Vector2.zero) return;
//if (Drift > 0.5f) return;
if (!ActionAfterJumpReady) return;
IsDashing = true;
DashTime = Time.time;
//Rigidbody.linearVelocity = direction.normalized * speed;
float angle = Mathf.Atan2(direction.y, direction.x) * Mathf.Rad2Deg + 180;
if (direction.normalized != Vector2.zero)
VfxDashHandler.PlayAll(this.transform.position, Quaternion.Euler(0f, 0f, angle));
DriftDirection = direction.normalized;
//Drift = speed;
//Rigidbody.AddForce(direction * speed, ForceMode2D.Impulse);
//Rigidbody.AddForce(direction.normalized * speed, ForceMode.Acceleration);
IsDashing = false;
}
IEnumerator DoDash(Vector2 direction) {
var startTime = Time.time;
var speed = MoveSpeed * DashSpeedInitial / MoveSpeedDampener;
//if (IsJumping) speed /= 2;
Rigidbody.linearVelocity = Vector2.zero;
//Rigidbody.AddForce(direction * speed, ForceMode2D.Impulse);
var mag = (direction.normalized * speed).magnitude;
Rigidbody.linearVelocity = direction.normalized * speed;
var isJumping = IsJumping;
if (isJumping) Jump();
while ((Time.time - startTime) < DashDelay1)
yield return null;
//yield return new WaitForSeconds(DashDelay1);
Rigidbody.linearVelocity = Vector2.zero;
var endTime = Time.time;
Debug.Log($"[{Mathf.Abs(mag):0.00}] Time elapsed {(endTime - startTime):0.000}");
yield return new WaitForSeconds(DashDelay2);
IsDashing = false;
yield return new WaitForSeconds(DashCooldown);
while (IsJumping)
yield return null;
CanDash = true;
}
private void Jump() {
if (SkillInUse) return;
IsJumping = true;
@ -180,10 +138,10 @@ public class Player : MonoBehaviour {
if (CoroutineJumpReset != null)
StopCoroutine(CoroutineJumpReset);
CoroutineJumpReset = StartCoroutine(ResetJumpAfterDelay());
//Rigidbody.AddForce(MoveDirection.normalized * MoveSpeed / 2, ForceMode2D.Force);
MoveSpeedDampener = 2;
}
public Coroutine CoroutineJumpReset { get; private set; }
private IEnumerator ResetJumpAfterDelay() {
yield return new WaitForSeconds(JumpDelay);
foreach (var col in BoxColliders)
@ -211,6 +169,11 @@ public class Player : MonoBehaviour {
}
private void UpdatePlayerStatus() {
if (Stamina == StaminaMax) return;
Stamina = Mathf.Min(Stamina + StaminaRegenPerSecond * Time.deltaTime, StaminaMax);
StaminaSliderHud.value = Stamina;
}
@ -221,17 +184,11 @@ public class Player : MonoBehaviour {
private void FixedUpdate() {
MovementUpdate();
CalculateFacingDirection();
UpdateAnimation();
}
private void MovementUpdate() {
//if (IsJumping && !IsDashing) {
// Rigidbody.AddForce(MoveDirection.normalized * MoveSpeed / 5, ForceMode2D.Force);
// return;
//}
var movement = (MoveDirection.normalized * MoveSpeed) / MoveSpeedDampener;
//var movement = MoveDirection.normalized * MoveSpeed;
if (IsDashing) {
if (DashSpeed < 0.2f) {
DashSpeed = 0;
@ -249,15 +206,6 @@ public class Player : MonoBehaviour {
Rigidbody.linearVelocity = movement;
}
private void CalculateFacingDirection() {
if (MoveDirection.x != 0)
if (MoveDirection.x < 0)
FaceDir = Directions.Left;
else
FaceDir = Directions.Right;
}
private void UpdateAnimation() {
string state = GetAnimationState(MoveDirection);
if (state.Last() == '_')

View File

@ -24,7 +24,7 @@ MonoBehaviour:
m_MinSize: {x: 300, y: 150}
m_MaxSize: {x: 24288, y: 24288}
vertical: 0
controlID: 125259
controlID: -1
draggingID: 0
--- !u!114 &2
MonoBehaviour:
@ -47,10 +47,10 @@ MonoBehaviour:
m_TextWithWhitespace: "Game\u200B"
m_Pos:
serializedVersion: 2
x: 1190
x: 1198.6667
y: 86
width: 975.3334
height: 535.3333
width: 967.33325
height: 534.6667
m_SerializedDataModeController:
m_DataMode: 0
m_PreferredDataMode: 0
@ -72,7 +72,7 @@ MonoBehaviour:
m_TextureFilterMode: 0
m_TextureHideFlags: 61
m_RenderIMGUI: 1
m_EnterPlayModeBehavior: 1
m_EnterPlayModeBehavior: 0
m_UseMipMap: 0
m_VSyncEnabled: 0
m_Gizmos: 0
@ -95,7 +95,7 @@ MonoBehaviour:
m_HSlider: 0
m_VSlider: 0
m_IgnoreScrollWheelUntilClicked: 0
m_EnableMouseInput: 1
m_EnableMouseInput: 0
m_EnableSliderZoomHorizontal: 0
m_EnableSliderZoomVertical: 0
m_UniformScale: 1
@ -104,23 +104,23 @@ MonoBehaviour:
serializedVersion: 2
x: 0
y: 21
width: 975.3334
height: 514.3333
m_Scale: {x: 0.71435183, y: 0.71435183}
m_Translation: {x: 487.6667, y: 257.16666}
width: 967.33325
height: 513.6667
m_Scale: {x: 1, y: 1}
m_Translation: {x: 483.66663, y: 256.83334}
m_MarginLeft: 0
m_MarginRight: 0
m_MarginTop: 0
m_MarginBottom: 0
m_LastShownAreaInsideMargins:
serializedVersion: 2
x: -682.67017
y: -360
width: 1365.3403
height: 720
x: -483.66663
y: -256.83334
width: 967.33325
height: 513.6667
m_MinimalGUI: 1
m_defaultScale: 0.71435183
m_LastWindowPixelSize: {x: 1463, y: 803}
m_defaultScale: 0.71342593
m_LastWindowPixelSize: {x: 1450.9999, y: 802}
m_ClearInEditMode: 1
m_NoCameraWarning: 1
m_LowResolutionForAspectRatios: 00000000000000000000
@ -146,12 +146,12 @@ MonoBehaviour:
serializedVersion: 2
x: 0
y: 0
width: 1252
width: 1252.6666
height: 1284.6667
m_MinSize: {x: 200, y: 150}
m_MaxSize: {x: 16192, y: 24288}
vertical: 1
controlID: 125260
controlID: -1
draggingID: 0
--- !u!114 &4
MonoBehaviour:
@ -172,12 +172,12 @@ MonoBehaviour:
serializedVersion: 2
x: 0
y: 0
width: 1252
width: 1252.6666
height: 882
m_MinSize: {x: 200, y: 100}
m_MaxSize: {x: 16192, y: 16192}
vertical: 0
controlID: 125261
controlID: -1
draggingID: 0
--- !u!114 &5
MonoBehaviour:
@ -198,12 +198,12 @@ MonoBehaviour:
serializedVersion: 2
x: 0
y: 0
width: 274.66666
width: 283.33334
height: 882
m_MinSize: {x: 100, y: 100}
m_MaxSize: {x: 8096, y: 16192}
vertical: 1
controlID: 125152
controlID: 125439
draggingID: 0
--- !u!114 &6
MonoBehaviour:
@ -222,7 +222,7 @@ MonoBehaviour:
serializedVersion: 2
x: 0
y: 0
width: 274.66666
width: 283.33334
height: 586.6667
m_MinSize: {x: 201, y: 226}
m_MaxSize: {x: 4001, y: 4026}
@ -254,7 +254,7 @@ MonoBehaviour:
serializedVersion: 2
x: 915.3334
y: 86
width: 273.66666
width: 282.33334
height: 560.6667
m_SerializedDataModeController:
m_DataMode: 0
@ -270,9 +270,9 @@ MonoBehaviour:
m_SceneHierarchy:
m_TreeViewState:
scrollPos: {x: 0, y: 0}
m_SelectedIDs:
m_LastClickedID: 0
m_ExpandedIDs: 76fdf7ff88fdf7fff800f8ff245dfdff869bfdffaa51ffff20f9ffff38f9ffffcef9fffffaa100004ca20000
m_SelectedIDs: f0d0f7ff
m_LastClickedID: -536336
m_ExpandedIDs: b6b9f5ffc4dcf5ffe6f6f5ff1401f6ffe6d0f7fff0d0f7ff04d1f7ff22d1f7ff2ed1f7ff6cd1f7ff38eef7ff76fdf7ff88fdf7fff800f8ff245dfdff869bfdff20f9ffff38f9ffffcef9fffffaa100004ca20000700902008a090200bc090200c2090200
m_RenameOverlay:
m_UserAcceptedRename: 0
m_Name:
@ -314,7 +314,7 @@ MonoBehaviour:
serializedVersion: 2
x: 0
y: 586.6667
width: 274.66666
width: 283.33334
height: 295.3333
m_MinSize: {x: 51, y: 76}
m_MaxSize: {x: 4001, y: 4026}
@ -346,7 +346,7 @@ MonoBehaviour:
serializedVersion: 2
x: 915.3334
y: 672.6667
width: 273.66666
width: 282.33334
height: 269.3333
m_SerializedDataModeController:
m_DataMode: 0
@ -376,14 +376,14 @@ MonoBehaviour:
- {fileID: 14}
m_Position:
serializedVersion: 2
x: 274.66666
x: 283.33334
y: 0
width: 977.3334
width: 969.33325
height: 882
m_MinSize: {x: 100, y: 100}
m_MaxSize: {x: 8096, y: 16192}
vertical: 1
controlID: 125262
controlID: -1
draggingID: 0
--- !u!114 &11
MonoBehaviour:
@ -402,8 +402,8 @@ MonoBehaviour:
serializedVersion: 2
x: 0
y: 0
width: 977.3334
height: 561.3333
width: 969.33325
height: 560.6667
m_MinSize: {x: 52, y: 76}
m_MaxSize: {x: 4002, y: 4026}
m_ActualView: {fileID: 2}
@ -436,8 +436,8 @@ MonoBehaviour:
serializedVersion: 2
x: 1190
y: 86
width: 975.3334
height: 535.3333
width: 976
height: 534.6667
m_SerializedDataModeController:
m_DataMode: 0
m_PreferredDataMode: 0
@ -880,9 +880,9 @@ MonoBehaviour:
m_AudioPlay: 0
m_DebugDrawModesUseInteractiveLightBakingData: 0
m_Position:
m_Target: {x: -3.2640777, y: -0.8338971, z: -0.044870697}
m_Target: {x: 872.89624, y: 524.46875, z: -7.8891673}
speed: 2
m_Value: {x: -3.2640777, y: -0.8338971, z: -0.044870697}
m_Value: {x: 872.89624, y: 524.46875, z: -7.8891673}
m_RenderMode: 0
m_CameraMode:
drawMode: 0
@ -932,9 +932,9 @@ MonoBehaviour:
speed: 2
m_Value: {x: 0, y: 0, z: 0, w: 1}
m_Size:
m_Target: 5.063645
m_Target: 789.7805
speed: 2
m_Value: 5.063645
m_Value: 789.7805
m_Ortho:
m_Target: 1
speed: 2
@ -989,10 +989,10 @@ MonoBehaviour:
m_TextWithWhitespace: "Recorder\u200B"
m_Pos:
serializedVersion: 2
x: 321
y: 79
width: 1140
height: 381
x: 1190
y: 86
width: 975.3334
height: 535.3333
m_SerializedDataModeController:
m_DataMode: 0
m_PreferredDataMode: 0
@ -1014,23 +1014,23 @@ MonoBehaviour:
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 12006, guid: 0000000000000000e000000000000000, type: 0}
m_Name: AnimatorControllerTool
m_Name: AnimationWindow
m_EditorClassIdentifier:
m_Children: []
m_Position:
serializedVersion: 2
x: 0
y: 561.3333
width: 977.3334
height: 320.6667
y: 560.6667
width: 969.33325
height: 321.3333
m_MinSize: {x: 52, y: 76}
m_MaxSize: {x: 4002, y: 4026}
m_ActualView: {fileID: 15}
m_ActualView: {fileID: 16}
m_Panes:
- {fileID: 15}
- {fileID: 16}
m_Selected: 0
m_LastSelected: 1
m_Selected: 1
m_LastSelected: 0
--- !u!114 &15
MonoBehaviour:
m_ObjectHideFlags: 52
@ -1070,15 +1070,32 @@ MonoBehaviour:
m_ViewTransforms:
m_KeySerializationHelper:
- {fileID: -2159016584420566100, guid: ba58731883bc8cb40be2ed19cc4be25a, type: 2}
- {fileID: 8178033774095782672, guid: 95f0b268d7716ae4fbf48e1e031c5006, type: 2}
m_ValueSerializationHelper:
- e00: 0.3013559
- e00: 0.7091452
e01: 0
e02: 0
e03: 203.76672
e03: -77.02728
e10: 0
e11: 0.3013559
e11: 0.7091452
e12: 0
e13: 96.95257
e13: 31.923752
e20: 0
e21: 0
e22: 1
e23: 0
e30: 0
e31: 0
e32: 0
e33: 1
- e00: 0.7092281
e01: 0
e02: 0
e03: 12.288605
e10: 0
e11: 0.7092281
e12: 0
e13: 63.239998
e20: 0
e21: 0
e22: 1
@ -1100,7 +1117,7 @@ MonoBehaviour:
m_MiniTool: 0
m_LockTracker:
m_IsLocked: 0
m_CurrentEditor: 0
m_CurrentEditor: 1
m_LayerEditor:
m_SelectedLayerIndex: 0
--- !u!114 &16
@ -1124,9 +1141,9 @@ MonoBehaviour:
m_TextWithWhitespace: "Animation\u200B"
m_Pos:
serializedVersion: 2
x: 1190.6667
x: 1198.6667
y: 646.6667
width: 974
width: 967.33325
height: 295.3333
m_SerializedDataModeController:
m_DataMode: 0
@ -1141,7 +1158,7 @@ MonoBehaviour:
m_OverlaysVisible: 1
m_LockTracker:
m_IsLocked: 0
m_LastSelectedObjectID: 41548
m_LastSelectedObjectID: -536336
--- !u!114 &17
MonoBehaviour:
m_ObjectHideFlags: 52
@ -1152,24 +1169,24 @@ MonoBehaviour:
m_Enabled: 1
m_EditorHideFlags: 1
m_Script: {fileID: 12006, guid: 0000000000000000e000000000000000, type: 0}
m_Name: ConsoleWindow
m_Name: ProjectBrowser
m_EditorClassIdentifier:
m_Children: []
m_Position:
serializedVersion: 2
x: 0
y: 882
width: 1252
width: 1252.6666
height: 402.66675
m_MinSize: {x: 101, y: 126}
m_MaxSize: {x: 4001, y: 4026}
m_ActualView: {fileID: 19}
m_MinSize: {x: 231, y: 276}
m_MaxSize: {x: 10001, y: 10026}
m_ActualView: {fileID: 18}
m_Panes:
- {fileID: 18}
- {fileID: 19}
- {fileID: 20}
m_Selected: 1
m_LastSelected: 0
m_Selected: 0
m_LastSelected: 1
--- !u!114 &18
MonoBehaviour:
m_ObjectHideFlags: 52
@ -1193,7 +1210,7 @@ MonoBehaviour:
serializedVersion: 2
x: 915.3334
y: 968
width: 1251
width: 1251.6666
height: 376.66675
m_SerializedDataModeController:
m_DataMode: 0
@ -1217,7 +1234,7 @@ MonoBehaviour:
m_SkipHidden: 0
m_SearchArea: 1
m_Folders:
- Assets/Scripts/Runtime/AI/StateMachines
- Assets/Prefabs/UI
m_Globs: []
m_ProductIds:
m_AnyWithAssetOrigin: 0
@ -1227,16 +1244,16 @@ MonoBehaviour:
m_ViewMode: 1
m_StartGridSize: 16
m_LastFolders:
- Assets/Scripts/Runtime/AI/StateMachines
- Assets/Prefabs/UI
m_LastFoldersGridSize: 16
m_LastProjectPath: C:\Users\Nico\Desktop\Projects\[ Gamedev ]\TowerDefenseGame
m_LockTracker:
m_IsLocked: 0
m_FolderTreeState:
scrollPos: {x: 0, y: 363.33325}
m_SelectedIDs: a6a40000
m_LastClickedID: 42150
m_ExpandedIDs: 00000000eea30000f0a30000f2a30000f4a30000f6a30000f8a30000faa30000fca30000fea3000000a4000002a4000004a4000006a4000008a400000aa400000ca400000ea4000012a4000014a4000016a4000018a4000080a4000082a400009ea40000a8a4000098bc0000
scrollPos: {x: 0, y: 751.99994}
m_SelectedIDs: 92a40000
m_LastClickedID: 42130
m_ExpandedIDs: 00000000eea30000f0a30000f2a30000f4a30000f6a30000f8a30000faa30000fca30000fea3000000a4000002a4000004a4000006a4000008a400000ca4000012a4000014a4000016a4000018a4000080a4000082a400009ea40000a8a4000098bc0000d600020044030200c20302006a060200ec070200
m_RenameOverlay:
m_UserAcceptedRename: 0
m_Name:
@ -1291,24 +1308,24 @@ MonoBehaviour:
m_Icon: {fileID: 0}
m_ResourceFile:
m_ListAreaState:
m_SelectedInstanceIDs:
m_LastClickedInstanceID: 0
m_HadKeyboardFocusLastEvent: 0
m_ExpandedInstanceIDs: c6230000ec950000f8950000da9500007a9f000010a900004cd100003ca30000000000005c2301005269010000680100ec670100f2670100586701007e670100
m_SelectedInstanceIDs: f0d0f7ff
m_LastClickedInstanceID: -536336
m_HadKeyboardFocusLastEvent: 1
m_ExpandedInstanceIDs: c6230000ec950000f8950000da9500007a9f000010a900004cd100003ca30000000000005c2301005269010000680100ec670100f2670100586701007e670100c66701006c6701004a68010014680100cc05020034080200ea040200
m_RenameOverlay:
m_UserAcceptedRename: 0
m_Name:
m_OriginalName:
m_Name: VfxHandlerDash01
m_OriginalName: VfxHandlerDash01
m_EditFieldRect:
serializedVersion: 2
x: 0
y: 0
width: 0
height: 0
m_UserData: 0
m_UserData: 39854
m_IsWaitingForDelay: 0
m_IsRenaming: 0
m_OriginalEventType: 11
m_OriginalEventType: 0
m_IsRenamingFilename: 1
m_TrimLeadingAndTrailingWhitespace: 0
m_ClientGUIView: {fileID: 17}
@ -1322,7 +1339,7 @@ MonoBehaviour:
m_ScrollPosition: {x: 0, y: 0}
m_GridSize: 16
m_SkipHiddenPackages: 0
m_DirectoriesAreaWidth: 291.66666
m_DirectoriesAreaWidth: 292.3333
--- !u!114 &19
MonoBehaviour:
m_ObjectHideFlags: 52
@ -1346,7 +1363,7 @@ MonoBehaviour:
serializedVersion: 2
x: 915.3334
y: 968
width: 1251
width: 1251.6666
height: 376.66675
m_SerializedDataModeController:
m_DataMode: 0
@ -1411,17 +1428,18 @@ MonoBehaviour:
m_Children: []
m_Position:
serializedVersion: 2
x: 1252
x: 1252.6666
y: 0
width: 391.33337
width: 390.66675
height: 1284.6667
m_MinSize: {x: 276, y: 76}
m_MaxSize: {x: 4001, y: 4026}
m_ActualView: {fileID: 22}
m_Panes:
- {fileID: 22}
- {fileID: 23}
m_Selected: 0
m_LastSelected: 0
m_LastSelected: 1
--- !u!114 &22
MonoBehaviour:
m_ObjectHideFlags: 52
@ -1443,9 +1461,9 @@ MonoBehaviour:
m_TextWithWhitespace: "Inspector\u200B"
m_Pos:
serializedVersion: 2
x: 2167.3335
x: 2168
y: 86
width: 390.33337
width: 389.66675
height: 1258.6667
m_SerializedDataModeController:
m_DataMode: 0
@ -1471,3 +1489,49 @@ MonoBehaviour:
m_LockTracker:
m_IsLocked: 0
m_PreviewWindow: {fileID: 0}
--- !u!114 &23
MonoBehaviour:
m_ObjectHideFlags: 52
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 13961, guid: 0000000000000000e000000000000000, type: 0}
m_Name:
m_EditorClassIdentifier:
m_MinSize: {x: 275, y: 50}
m_MaxSize: {x: 4000, y: 4000}
m_TitleContent:
m_Text: Player
m_Image: {fileID: -7606759526039521141, guid: 0000000000000000d000000000000000, type: 0}
m_Tooltip: HomeTown/Player
m_TextWithWhitespace: "Player\u200B"
m_Pos:
serializedVersion: 2
x: 2168
y: 86
width: 389.66675
height: 1258.6667
m_SerializedDataModeController:
m_DataMode: 0
m_PreferredDataMode: 0
m_SupportedDataModes:
isAutomatic: 1
m_ViewDataDictionary: {fileID: 0}
m_OverlayCanvas:
m_LastAppliedPresetName: Default
m_SaveData: []
m_ContainerData: []
m_OverlaysVisible: 1
m_ObjectsLockedBeforeSerialization: []
m_InstanceIDsLockedBeforeSerialization:
m_PreviewResizer:
m_CachedPref: 151
m_ControlHash: 1412526313
m_PrefName: Preview_InspectorPreview
m_LastInspectedObjectInstanceID: -1
m_LastVerticalScrollValue: 54
m_GlobalObjectId: GlobalObjectId_V1-2-2cda990e2423bbf4892e6590ba056729-9147163641451663911-2316236105731553357
m_InspectorMode: 0