From e2299a4751b922687376ef9a43fbd0e3d627b5db Mon Sep 17 00:00:00 2001
From: MuhamadAjiW <16521119@mahasiswa.itb.ac.id>
Date: Tue, 23 Apr 2024 16:06:32 +0700
Subject: [PATCH] fix: weapon switching

---
 .../WeaponData/NoWeapon/NoWeaponData.asset    |  3 +-
 .../TestWeapon/TestWeaponData.asset           |  3 +-
 .../TestCollectible/Animations.meta           |  8 --
 .../Prefabs/Weapons/NoWeapon/NoWeapon.prefab  |  3 +-
 .../Weapons/TestWeapon/TestWeapon.prefab      |  4 +-
 Assets/Scenes/SampleScene.unity               | 90 ++++++++++++++++---
 .../Core/Game/GameCameraController.cs         |  4 +-
 .../Core/Objects/Weapons/NoWeapon/NoWeapon.cs |  3 +-
 Assets/_Scripts/Core/Player/Player.cs         |  6 +-
 .../Core/Player/PlayerInputController.cs      |  3 +-
 .../EntityObject/CombatantEntity.cs           | 31 ++++---
 .../Library/DataTypes/CompanionData.cs        |  2 +-
 .../Library/DataTypes/ProjectileData.cs       |  2 +-
 .../_Scripts/Library/DataTypes/WeaponData.cs  |  2 +-
 .../Library/Events/InteractAreaExitEvent.cs   |  6 --
 .../Events/InteractAreaExitEvent.cs.meta      | 11 ---
 Assets/_Scripts/Library/Util/ObjectFactory.cs | 24 ++---
 Packages/manifest.json                        |  8 +-
 Packages/packages-lock.json                   | 54 ++++++-----
 ProjectSettings/MultiplayerManager.asset      |  7 ++
 ProjectSettings/ProjectVersion.txt            |  4 +-
 21 files changed, 164 insertions(+), 114 deletions(-)
 delete mode 100644 Assets/Resources/Prefabs/Collectibles/TestCollectible/Animations.meta
 delete mode 100644 Assets/_Scripts/Library/Events/InteractAreaExitEvent.cs
 delete mode 100644 Assets/_Scripts/Library/Events/InteractAreaExitEvent.cs.meta
 create mode 100644 ProjectSettings/MultiplayerManager.asset

diff --git a/Assets/Resources/Data/WeaponData/NoWeapon/NoWeaponData.asset b/Assets/Resources/Data/WeaponData/NoWeapon/NoWeaponData.asset
index 24c9777c..62dc57d8 100644
--- a/Assets/Resources/Data/WeaponData/NoWeapon/NoWeaponData.asset
+++ b/Assets/Resources/Data/WeaponData/NoWeapon/NoWeaponData.asset
@@ -12,8 +12,9 @@ MonoBehaviour:
   m_Script: {fileID: 11500000, guid: abc4ca3f3ac6a5646addd6dfbe0b996b, type: 3}
   m_Name: NoWeaponData
   m_EditorClassIdentifier: 
+  prefabPath: Prefabs/Weapons/NoWeapon/NoWeapon
+  model: {fileID: 0}
   baseDamage: 0
   knockbackPower: 0
   attackInterval: 0
   alternateAttackInterval: 0
-  model: {fileID: 0}
diff --git a/Assets/Resources/Data/WeaponData/TestWeapon/TestWeaponData.asset b/Assets/Resources/Data/WeaponData/TestWeapon/TestWeaponData.asset
index 04df8115..44f33fbd 100644
--- a/Assets/Resources/Data/WeaponData/TestWeapon/TestWeaponData.asset
+++ b/Assets/Resources/Data/WeaponData/TestWeapon/TestWeaponData.asset
@@ -12,8 +12,9 @@ MonoBehaviour:
   m_Script: {fileID: 11500000, guid: abc4ca3f3ac6a5646addd6dfbe0b996b, type: 3}
   m_Name: TestWeaponData
   m_EditorClassIdentifier: 
+  prefabPath: Prefabs/Weapons/TestWeapon/TestWeapon
+  model: {fileID: 6146631199650576833, guid: 50599534a77c7dd46b591a71fbb5feba, type: 3}
   baseDamage: 10
   knockbackPower: 10
   attackInterval: 0.2
   alternateAttackInterval: 1
-  model: {fileID: 6146631199650576833, guid: 50599534a77c7dd46b591a71fbb5feba, type: 3}
diff --git a/Assets/Resources/Prefabs/Collectibles/TestCollectible/Animations.meta b/Assets/Resources/Prefabs/Collectibles/TestCollectible/Animations.meta
deleted file mode 100644
index d61897b6..00000000
--- a/Assets/Resources/Prefabs/Collectibles/TestCollectible/Animations.meta
+++ /dev/null
@@ -1,8 +0,0 @@
-fileFormatVersion: 2
-guid: ac05b56fa5d08a5429b7e3a35146dd45
-folderAsset: yes
-DefaultImporter:
-  externalObjects: {}
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 
diff --git a/Assets/Resources/Prefabs/Weapons/NoWeapon/NoWeapon.prefab b/Assets/Resources/Prefabs/Weapons/NoWeapon/NoWeapon.prefab
index 0e5dbfdd..1b329c1d 100644
--- a/Assets/Resources/Prefabs/Weapons/NoWeapon/NoWeapon.prefab
+++ b/Assets/Resources/Prefabs/Weapons/NoWeapon/NoWeapon.prefab
@@ -16,7 +16,7 @@ GameObject:
   m_Icon: {fileID: 0}
   m_NavMeshLayer: 0
   m_StaticEditorFlags: 0
-  m_IsActive: 1
+  m_IsActive: 0
 --- !u!4 &7056211513795390601
 Transform:
   m_ObjectHideFlags: 0
@@ -44,5 +44,4 @@ MonoBehaviour:
   m_Script: {fileID: 11500000, guid: aeafa263f26404c4a9f653e7d0889d83, type: 3}
   m_Name: 
   m_EditorClassIdentifier: 
-  prefabPath: Prefabs/Weapons/NoWeapon/NoWeapon
   data: {fileID: 11400000, guid: 1f732bd8cfb50da4dad418d1fcdedd01, type: 2}
diff --git a/Assets/Resources/Prefabs/Weapons/TestWeapon/TestWeapon.prefab b/Assets/Resources/Prefabs/Weapons/TestWeapon/TestWeapon.prefab
index c7d6d573..6f3b3320 100644
--- a/Assets/Resources/Prefabs/Weapons/TestWeapon/TestWeapon.prefab
+++ b/Assets/Resources/Prefabs/Weapons/TestWeapon/TestWeapon.prefab
@@ -16,7 +16,7 @@ GameObject:
   m_Icon: {fileID: 0}
   m_NavMeshLayer: 0
   m_StaticEditorFlags: 0
-  m_IsActive: 1
+  m_IsActive: 0
 --- !u!4 &1050311400148833009
 Transform:
   m_ObjectHideFlags: 0
@@ -45,9 +45,7 @@ MonoBehaviour:
   m_Script: {fileID: 11500000, guid: 68705b8ed948aae4d98ef6e87b6f6961, type: 3}
   m_Name: 
   m_EditorClassIdentifier: 
-  prefabPath: Prefabs/Weapons/TestWeapon/TestWeapon
   data: {fileID: 11400000, guid: 875c881f7a9ed2347a9d28ca2c18c4b5, type: 2}
-  canAttack: 0
   fireRange: 10
   projectileSpeed: 50
 --- !u!1001 &3646467262361916678
diff --git a/Assets/Scenes/SampleScene.unity b/Assets/Scenes/SampleScene.unity
index 5ea35f41..6b58b70a 100644
--- a/Assets/Scenes/SampleScene.unity
+++ b/Assets/Scenes/SampleScene.unity
@@ -13,7 +13,7 @@ OcclusionCullingSettings:
 --- !u!104 &2
 RenderSettings:
   m_ObjectHideFlags: 0
-  serializedVersion: 9
+  serializedVersion: 10
   m_Fog: 0
   m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
   m_FogMode: 3
@@ -38,13 +38,12 @@ RenderSettings:
   m_ReflectionIntensity: 1
   m_CustomReflection: {fileID: 0}
   m_Sun: {fileID: 705507994}
-  m_IndirectSpecularColor: {r: 0.44657898, g: 0.4964133, b: 0.5748178, a: 1}
+  m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1}
   m_UseRadianceAmbientProbe: 0
 --- !u!157 &3
 LightmapSettings:
   m_ObjectHideFlags: 0
   serializedVersion: 12
-  m_GIWorkflowMode: 1
   m_GISettings:
     serializedVersion: 2
     m_BounceScale: 1
@@ -67,9 +66,6 @@ LightmapSettings:
     m_LightmapParameters: {fileID: 0}
     m_LightmapsBakeMode: 1
     m_TextureCompression: 1
-    m_FinalGather: 0
-    m_FinalGatherFiltering: 1
-    m_FinalGatherRayCount: 256
     m_ReflectionCompression: 2
     m_MixedBakeMode: 2
     m_BakeBackend: 1
@@ -226,6 +222,7 @@ Transform:
   m_ConstrainProportionsScale: 0
   m_Children:
   - {fileID: 675919035}
+  - {fileID: 1164574346}
   m_Father: {fileID: 484130345}
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
 --- !u!114 &117855958
@@ -246,14 +243,16 @@ MonoBehaviour:
   jumpForce: 5
   groundLayers:
     serializedVersion: 2
-    m_Bits: 1
+    m_Bits: 0
   maxHealth: 100
   health: 100
   damagedDelay: 1
-  baseDamage: 10
-  weaponLocation: {x: 0.258, y: 0.889, z: 0.375}
   weaponList:
   - {fileID: 5029868015402955001, guid: 1a7698227caac3d429dceb8aa5056502, type: 3}
+  baseDamage: 10
+  weaponLocation: {x: 0.258, y: 0.889, z: 0.375}
+  companionList: []
+  activeCompanions: 
 --- !u!1 &239523005
 GameObject:
   m_ObjectHideFlags: 0
@@ -473,6 +472,8 @@ MeshRenderer:
   m_ReflectionProbeUsage: 1
   m_RayTracingMode: 2
   m_RayTraceProcedural: 0
+  m_RayTracingAccelStructBuildFlagsOverride: 0
+  m_RayTracingAccelStructBuildFlags: 1
   m_RenderingLayerMask: 1
   m_RendererPriority: 0
   m_Materials:
@@ -563,11 +564,10 @@ Light:
   m_PrefabAsset: {fileID: 0}
   m_GameObject: {fileID: 705507993}
   m_Enabled: 1
-  serializedVersion: 10
+  serializedVersion: 11
   m_Type: 1
-  m_Shape: 0
   m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1}
-  m_Intensity: 0.5
+  m_Intensity: 1
   m_Range: 10
   m_SpotAngle: 30
   m_InnerSpotAngle: 21.80208
@@ -694,6 +694,8 @@ MeshRenderer:
   m_ReflectionProbeUsage: 1
   m_RayTracingMode: 2
   m_RayTraceProcedural: 0
+  m_RayTracingAccelStructBuildFlagsOverride: 0
+  m_RayTracingAccelStructBuildFlags: 1
   m_RenderingLayerMask: 1
   m_RendererPriority: 0
   m_Materials:
@@ -843,6 +845,8 @@ MeshRenderer:
   m_ReflectionProbeUsage: 1
   m_RayTracingMode: 2
   m_RayTraceProcedural: 0
+  m_RayTracingAccelStructBuildFlagsOverride: 0
+  m_RayTracingAccelStructBuildFlags: 1
   m_RenderingLayerMask: 1
   m_RendererPriority: 0
   m_Materials:
@@ -1032,6 +1036,68 @@ MonoBehaviour:
   m_Script: {fileID: 11500000, guid: c54dc993f0d1e36499ea37e182a87cbc, type: 3}
   m_Name: 
   m_EditorClassIdentifier: 
+--- !u!1001 &1164574345
+PrefabInstance:
+  m_ObjectHideFlags: 0
+  serializedVersion: 2
+  m_Modification:
+    serializedVersion: 3
+    m_TransformParent: {fileID: 117855957}
+    m_Modifications:
+    - target: {fileID: 691014024523472006, guid: 50599534a77c7dd46b591a71fbb5feba, type: 3}
+      propertyPath: m_LocalPosition.x
+      value: 0.258
+      objectReference: {fileID: 0}
+    - target: {fileID: 691014024523472006, guid: 50599534a77c7dd46b591a71fbb5feba, type: 3}
+      propertyPath: m_LocalPosition.y
+      value: 0.889
+      objectReference: {fileID: 0}
+    - target: {fileID: 691014024523472006, guid: 50599534a77c7dd46b591a71fbb5feba, type: 3}
+      propertyPath: m_LocalPosition.z
+      value: 0.375
+      objectReference: {fileID: 0}
+    - target: {fileID: 691014024523472006, guid: 50599534a77c7dd46b591a71fbb5feba, type: 3}
+      propertyPath: m_LocalRotation.w
+      value: 1
+      objectReference: {fileID: 0}
+    - target: {fileID: 691014024523472006, guid: 50599534a77c7dd46b591a71fbb5feba, type: 3}
+      propertyPath: m_LocalRotation.x
+      value: 0
+      objectReference: {fileID: 0}
+    - target: {fileID: 691014024523472006, guid: 50599534a77c7dd46b591a71fbb5feba, type: 3}
+      propertyPath: m_LocalRotation.y
+      value: 0
+      objectReference: {fileID: 0}
+    - target: {fileID: 691014024523472006, guid: 50599534a77c7dd46b591a71fbb5feba, type: 3}
+      propertyPath: m_LocalRotation.z
+      value: 0
+      objectReference: {fileID: 0}
+    - target: {fileID: 691014024523472006, guid: 50599534a77c7dd46b591a71fbb5feba, type: 3}
+      propertyPath: m_LocalEulerAnglesHint.x
+      value: 0
+      objectReference: {fileID: 0}
+    - target: {fileID: 691014024523472006, guid: 50599534a77c7dd46b591a71fbb5feba, type: 3}
+      propertyPath: m_LocalEulerAnglesHint.y
+      value: 0
+      objectReference: {fileID: 0}
+    - target: {fileID: 691014024523472006, guid: 50599534a77c7dd46b591a71fbb5feba, type: 3}
+      propertyPath: m_LocalEulerAnglesHint.z
+      value: 0
+      objectReference: {fileID: 0}
+    - target: {fileID: 6146631199650576833, guid: 50599534a77c7dd46b591a71fbb5feba, type: 3}
+      propertyPath: m_Name
+      value: TestWeaponModel
+      objectReference: {fileID: 0}
+    m_RemovedComponents: []
+    m_RemovedGameObjects: []
+    m_AddedGameObjects: []
+    m_AddedComponents: []
+  m_SourcePrefab: {fileID: 100100000, guid: 50599534a77c7dd46b591a71fbb5feba, type: 3}
+--- !u!4 &1164574346 stripped
+Transform:
+  m_CorrespondingSourceObject: {fileID: 691014024523472006, guid: 50599534a77c7dd46b591a71fbb5feba, type: 3}
+  m_PrefabInstance: {fileID: 1164574345}
+  m_PrefabAsset: {fileID: 0}
 --- !u!1 &2127634080
 GameObject:
   m_ObjectHideFlags: 0
diff --git a/Assets/_Scripts/Core/Game/GameCameraController.cs b/Assets/_Scripts/Core/Game/GameCameraController.cs
index 2c41bd6c..96398725 100644
--- a/Assets/_Scripts/Core/Game/GameCameraController.cs
+++ b/Assets/_Scripts/Core/Game/GameCameraController.cs
@@ -29,14 +29,14 @@ public class GameCameraController
 
     public void ResetCameraBehaviour()
     {
-        GameObject.Destroy(activeCamera.GetComponent<CameraBehaviour>());
+        UnityEngine.GameObject.Destroy(activeCamera.GetComponent<CameraBehaviour>());
         behaviourType = CameraBehaviourType.NULL;
         behaviour = null;
     }
 
     public void SetCameraBehaviour(CameraBehaviourType cameraBehaviourType)
     {
-        GameObject.Destroy(activeCamera.GetComponent<CameraBehaviour>());
+        UnityEngine.GameObject.Destroy(activeCamera.GetComponent<CameraBehaviour>());
 
         behaviour = cameraBehaviourType switch
         {
diff --git a/Assets/_Scripts/Core/Objects/Weapons/NoWeapon/NoWeapon.cs b/Assets/_Scripts/Core/Objects/Weapons/NoWeapon/NoWeapon.cs
index 50b41880..8bc6adc2 100644
--- a/Assets/_Scripts/Core/Objects/Weapons/NoWeapon/NoWeapon.cs
+++ b/Assets/_Scripts/Core/Objects/Weapons/NoWeapon/NoWeapon.cs
@@ -1,4 +1,5 @@
-public class NoWeapon : WeaponObject{
+public class NoWeapon : WeaponObject
+{
     // Constants
     public const string weaponPrefab = "Prefabs/Weapons/NoWeapon/NoWeapon";
     
diff --git a/Assets/_Scripts/Core/Player/Player.cs b/Assets/_Scripts/Core/Player/Player.cs
index aacf5dd0..00b498d7 100644
--- a/Assets/_Scripts/Core/Player/Player.cs
+++ b/Assets/_Scripts/Core/Player/Player.cs
@@ -31,12 +31,8 @@ public class Player : PlayerEntity
         animationController = new PlayerAnimationController(this);
         stats = new PlayerStats(this);
 
-        WeaponList.Add(GetComponentInChildren<WeaponObject>());
         
-        foreach (WeaponObject weapon in GetComponentsInChildren<WeaponObject>())
-        {
-            WeaponList.Add(weapon);
-        }
+        WeaponList.AddRange(GetComponentsInChildren<WeaponObject>());
         EquipWeapon(0);
 
         GameController.instance.player = this;
diff --git a/Assets/_Scripts/Core/Player/PlayerInputController.cs b/Assets/_Scripts/Core/Player/PlayerInputController.cs
index e0f77e0d..6cb01613 100644
--- a/Assets/_Scripts/Core/Player/PlayerInputController.cs
+++ b/Assets/_Scripts/Core/Player/PlayerInputController.cs
@@ -46,7 +46,6 @@ public class PlayerInputController
             Debug.Log("Attacking using Weapon");
 
             player.Weapon.Attack();
-            (player.Weapon as TestWeapon).AlternateAttack();
         }
         else if(Input.GetKeyDown(GameInput.instance.attackAlternateButton))
         {
@@ -57,7 +56,7 @@ public class PlayerInputController
                 return;
             }
 
-            (player.Weapon as TestWeapon).AlternateAttack();
+            player.Weapon.AlternateAttack();
         }
         else if(Input.GetKeyDown(GameInput.instance.interactButton))
         {
diff --git a/Assets/_Scripts/Library/BaseClasses/EntityObject/CombatantEntity.cs b/Assets/_Scripts/Library/BaseClasses/EntityObject/CombatantEntity.cs
index 5e16f79f..4c74297a 100644
--- a/Assets/_Scripts/Library/BaseClasses/EntityObject/CombatantEntity.cs
+++ b/Assets/_Scripts/Library/BaseClasses/EntityObject/CombatantEntity.cs
@@ -1,6 +1,7 @@
 using System;
 using System.Collections.Generic;
 using System.Reflection;
+using Unity.VisualScripting;
 using UnityEngine;
 
 public class CombatantEntity : DamageableEntity, IArmed
@@ -51,22 +52,32 @@ public class CombatantEntity : DamageableEntity, IArmed
 
         UnequipWeapon();
 
+        Debug.Log($"Equipping weapon {index}");
         WeaponIndex = index;
         WeaponObject selectedWeapon = WeaponList[WeaponIndex];
-        WeaponObject weaponObject = ObjectFactory.CreateObject<WeaponObject>(
-            prefabPath: selectedWeapon == null? NoWeapon.weaponPrefab : selectedWeapon.data.prefabPath,
-            parent: transform, 
-            objectName: EnvironmentConfig.OBJECT_WEAPON
-        );
-        weaponObject.transform.localPosition = WeaponLocation;
-        weaponObject.gameObject.layer = LayerMask.NameToLayer(AttackLayerCode);
-        weapon = weaponObject;
+        
+        // To handle editor prefab dragndrops
+        Debug.Log($"Length: {WeaponList.Count}");
+        if(!selectedWeapon.gameObject.scene.IsValid())
+        {
+            selectedWeapon = ObjectFactory.CreateObject<WeaponObject>(
+                prefabPath: selectedWeapon == null? NoWeapon.weaponPrefab : selectedWeapon.data.prefabPath,
+                parent: transform, 
+                objectName: EnvironmentConfig.OBJECT_WEAPON
+            );
+            WeaponList[WeaponIndex] = selectedWeapon;
+        }
+        selectedWeapon.gameObject.SetActive(true);
+        weapon = selectedWeapon;
+        // weaponObject.transform.localPosition = WeaponLocation;
+        // weaponObject.gameObject.layer = LayerMask.NameToLayer(AttackLayerCode);
+        // weapon = weaponObject;
     }
 
     public void UnequipWeapon(){
-        foreach (WeaponObject weapon in GetComponentsInChildren<WeaponObject>())
+        foreach (WeaponObject weapon in WeaponList)
         {
-            Destroy(weapon.gameObject);
+            weapon.gameObject.SetActive(false);
         }
     }
 }
diff --git a/Assets/_Scripts/Library/DataTypes/CompanionData.cs b/Assets/_Scripts/Library/DataTypes/CompanionData.cs
index 5bfb22e7..ca28a157 100644
--- a/Assets/_Scripts/Library/DataTypes/CompanionData.cs
+++ b/Assets/_Scripts/Library/DataTypes/CompanionData.cs
@@ -8,5 +8,5 @@ public class CompanionData : ScriptableObject
     // Learn other systems than this obviously
     // but I think the window to learn and implement a new system is not viable within the scope of the project
     public string prefabPath;
-    public GameObject model;
+    public UnityEngine.GameObject model;
 }
\ No newline at end of file
diff --git a/Assets/_Scripts/Library/DataTypes/ProjectileData.cs b/Assets/_Scripts/Library/DataTypes/ProjectileData.cs
index 9215a845..dc297358 100644
--- a/Assets/_Scripts/Library/DataTypes/ProjectileData.cs
+++ b/Assets/_Scripts/Library/DataTypes/ProjectileData.cs
@@ -4,7 +4,7 @@ using UnityEngine;
 [CreateAssetMenu(fileName = "NewProjectileData", menuName = "Data/Weapon/Projectile Data")]
 public class ProjectileData : ScriptableObject
 {
-    public GameObject model;
+    public UnityEngine.GameObject model;
     public float speed;
     public float travelDistance;
     public bool through;
diff --git a/Assets/_Scripts/Library/DataTypes/WeaponData.cs b/Assets/_Scripts/Library/DataTypes/WeaponData.cs
index 3a1f31fb..a5d68665 100644
--- a/Assets/_Scripts/Library/DataTypes/WeaponData.cs
+++ b/Assets/_Scripts/Library/DataTypes/WeaponData.cs
@@ -8,7 +8,7 @@ public class WeaponData : ScriptableObject
     // Learn other systems than this obviously
     // but I think the window to learn and implement a new system is not viable within the scope of the project
     public string prefabPath;
-    public GameObject model;
+    public UnityEngine.GameObject model;
     public float baseDamage;
     public float knockbackPower;
     public float attackInterval;
diff --git a/Assets/_Scripts/Library/Events/InteractAreaExitEvent.cs b/Assets/_Scripts/Library/Events/InteractAreaExitEvent.cs
deleted file mode 100644
index 901ac0a3..00000000
--- a/Assets/_Scripts/Library/Events/InteractAreaExitEvent.cs
+++ /dev/null
@@ -1,6 +0,0 @@
-using System;
-
-public class InteractAreaExitArgs : EventArgs 
-{
-}
-public delegate void InteractAreaExitEvent(InteractAreaExitArgs e);
\ No newline at end of file
diff --git a/Assets/_Scripts/Library/Events/InteractAreaExitEvent.cs.meta b/Assets/_Scripts/Library/Events/InteractAreaExitEvent.cs.meta
deleted file mode 100644
index 1fa2f6a7..00000000
--- a/Assets/_Scripts/Library/Events/InteractAreaExitEvent.cs.meta
+++ /dev/null
@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: c8cd2d5f19abe754e98f4b45e9635c6c
-MonoImporter:
-  externalObjects: {}
-  serializedVersion: 2
-  defaultReferences: []
-  executionOrder: 0
-  icon: {instanceID: 0}
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 
diff --git a/Assets/_Scripts/Library/Util/ObjectFactory.cs b/Assets/_Scripts/Library/Util/ObjectFactory.cs
index b4d3abaf..8155f257 100644
--- a/Assets/_Scripts/Library/Util/ObjectFactory.cs
+++ b/Assets/_Scripts/Library/Util/ObjectFactory.cs
@@ -6,7 +6,7 @@ using UnityEngine;
 public static class ObjectFactory
 {
     // Functions
-    public static GameObject CreateObject(
+    public static UnityEngine.GameObject CreateObject(
         string prefabPath,
         Transform parent = null,
         Vector3? position = null,
@@ -16,7 +16,7 @@ public static class ObjectFactory
         string objectName = "Unnamed Object"
     )
     {
-        GameObject prefabObject = Resources.Load<GameObject>(prefabPath);
+        UnityEngine.GameObject prefabObject = Resources.Load<UnityEngine.GameObject>(prefabPath);
         
         if(prefabObject == null)
         {
@@ -26,8 +26,8 @@ public static class ObjectFactory
         return CreateObject(prefabObject, parent, position, scale, rotation, renderingOrder, objectName);
     }
 
-    public static GameObject CreateObject(
-        GameObject gameObject,
+    public static UnityEngine.GameObject CreateObject(
+        UnityEngine.GameObject gameObject,
         Transform parent = null,
         Vector3? position = null,
         Vector3? scale = null,
@@ -36,9 +36,9 @@ public static class ObjectFactory
         string objectName = "Unnamed Object"
     )
     {
-        GameObject createdObject = parent == null?
-            GameObject.Instantiate(gameObject, ObjectManager.instance.transform) :
-            GameObject.Instantiate(gameObject, parent);
+        UnityEngine.GameObject createdObject = parent == null?
+            UnityEngine.GameObject.Instantiate(gameObject, ObjectManager.instance.transform) :
+            UnityEngine.GameObject.Instantiate(gameObject, parent);
 
         if(position != null)
         {
@@ -71,7 +71,7 @@ public static class ObjectFactory
         string objectName = "Unnamed Object"
     ) where T : MonoBehaviour 
     {
-        GameObject prefabObject = CreateObject(
+        UnityEngine.GameObject prefabObject = CreateObject(
             prefabPath, 
             parent == null? ObjectManager.instance.transform : parent, 
             position, 
@@ -90,7 +90,7 @@ public static class ObjectFactory
     }
 
     public static T CreateObject<T>(
-        GameObject gameObject,
+        UnityEngine.GameObject gameObject,
         Transform parent = null,
         Vector3? position = null,
         Vector3? scale = null,
@@ -99,7 +99,7 @@ public static class ObjectFactory
         string objectName = "Unnamed Object"
     ) where T : MonoBehaviour 
     {
-        GameObject prefabObject = CreateObject(
+        UnityEngine.GameObject prefabObject = CreateObject(
             gameObject, 
             parent == null? ObjectManager.instance.transform : parent, 
             position, 
@@ -242,9 +242,9 @@ public static class ObjectFactory
     }
 
     // Internal functions
-    private static IEnumerator DestroyWithDelay(GameObject gameObject, float delay)
+    private static IEnumerator DestroyWithDelay(UnityEngine.GameObject gameObject, float delay)
     {
         yield return new WaitForSeconds(delay);
-        GameObject.Destroy(gameObject);
+        UnityEngine.GameObject.Destroy(gameObject);
     }
 }
diff --git a/Packages/manifest.json b/Packages/manifest.json
index 1bd39c8e..42355c61 100644
--- a/Packages/manifest.json
+++ b/Packages/manifest.json
@@ -1,11 +1,11 @@
 {
   "dependencies": {
     "com.unity.collab-proxy": "2.3.1",
-    "com.unity.feature.development": "1.0.1",
-    "com.unity.textmeshpro": "3.0.6",
-    "com.unity.timeline": "1.7.6",
-    "com.unity.ugui": "1.0.0",
+    "com.unity.feature.development": "1.0.2",
+    "com.unity.timeline": "1.8.6",
+    "com.unity.ugui": "2.0.0",
     "com.unity.visualscripting": "1.9.1",
+    "com.unity.modules.accessibility": "1.0.0",
     "com.unity.modules.ai": "1.0.0",
     "com.unity.modules.androidjni": "1.0.0",
     "com.unity.modules.animation": "1.0.0",
diff --git a/Packages/packages-lock.json b/Packages/packages-lock.json
index 16aa475e..a1493fcb 100644
--- a/Packages/packages-lock.json
+++ b/Packages/packages-lock.json
@@ -15,28 +15,27 @@
       "url": "https://packages.unity.com"
     },
     "com.unity.ext.nunit": {
-      "version": "1.0.6",
+      "version": "2.0.5",
       "depth": 2,
       "source": "registry",
       "dependencies": {},
       "url": "https://packages.unity.com"
     },
     "com.unity.feature.development": {
-      "version": "1.0.1",
+      "version": "1.0.2",
       "depth": 0,
       "source": "builtin",
       "dependencies": {
         "com.unity.ide.visualstudio": "2.0.22",
-        "com.unity.ide.rider": "3.0.26",
-        "com.unity.ide.vscode": "1.2.5",
+        "com.unity.ide.rider": "3.0.28",
         "com.unity.editorcoroutines": "1.0.0",
         "com.unity.performance.profile-analyzer": "1.2.2",
-        "com.unity.test-framework": "1.1.33",
-        "com.unity.testtools.codecoverage": "1.2.4"
+        "com.unity.test-framework": "1.3.9",
+        "com.unity.testtools.codecoverage": "1.2.5"
       }
     },
     "com.unity.ide.rider": {
-      "version": "3.0.26",
+      "version": "3.0.28",
       "depth": 1,
       "source": "registry",
       "dependencies": {
@@ -53,13 +52,6 @@
       },
       "url": "https://packages.unity.com"
     },
-    "com.unity.ide.vscode": {
-      "version": "1.2.5",
-      "depth": 1,
-      "source": "registry",
-      "dependencies": {},
-      "url": "https://packages.unity.com"
-    },
     "com.unity.performance.profile-analyzer": {
       "version": "1.2.2",
       "depth": 1,
@@ -75,18 +67,18 @@
       "url": "https://packages.unity.com"
     },
     "com.unity.test-framework": {
-      "version": "1.1.33",
+      "version": "1.3.9",
       "depth": 1,
       "source": "registry",
       "dependencies": {
-        "com.unity.ext.nunit": "1.0.6",
+        "com.unity.ext.nunit": "2.0.3",
         "com.unity.modules.imgui": "1.0.0",
         "com.unity.modules.jsonserialize": "1.0.0"
       },
       "url": "https://packages.unity.com"
     },
     "com.unity.testtools.codecoverage": {
-      "version": "1.2.4",
+      "version": "1.2.5",
       "depth": 1,
       "source": "registry",
       "dependencies": {
@@ -95,17 +87,8 @@
       },
       "url": "https://packages.unity.com"
     },
-    "com.unity.textmeshpro": {
-      "version": "3.0.6",
-      "depth": 0,
-      "source": "registry",
-      "dependencies": {
-        "com.unity.ugui": "1.0.0"
-      },
-      "url": "https://packages.unity.com"
-    },
     "com.unity.timeline": {
-      "version": "1.7.6",
+      "version": "1.8.6",
       "depth": 0,
       "source": "registry",
       "dependencies": {
@@ -117,7 +100,7 @@
       "url": "https://packages.unity.com"
     },
     "com.unity.ugui": {
-      "version": "1.0.0",
+      "version": "2.0.0",
       "depth": 0,
       "source": "builtin",
       "dependencies": {
@@ -135,6 +118,12 @@
       },
       "url": "https://packages.unity.com"
     },
+    "com.unity.modules.accessibility": {
+      "version": "1.0.0",
+      "depth": 0,
+      "source": "builtin",
+      "dependencies": {}
+    },
     "com.unity.modules.ai": {
       "version": "1.0.0",
       "depth": 0,
@@ -182,6 +171,12 @@
         "com.unity.modules.animation": "1.0.0"
       }
     },
+    "com.unity.modules.hierarchycore": {
+      "version": "1.0.0",
+      "depth": 1,
+      "source": "builtin",
+      "dependencies": {}
+    },
     "com.unity.modules.imageconversion": {
       "version": "1.0.0",
       "depth": 0,
@@ -270,7 +265,8 @@
       "dependencies": {
         "com.unity.modules.ui": "1.0.0",
         "com.unity.modules.imgui": "1.0.0",
-        "com.unity.modules.jsonserialize": "1.0.0"
+        "com.unity.modules.jsonserialize": "1.0.0",
+        "com.unity.modules.hierarchycore": "1.0.0"
       }
     },
     "com.unity.modules.umbra": {
diff --git a/ProjectSettings/MultiplayerManager.asset b/ProjectSettings/MultiplayerManager.asset
new file mode 100644
index 00000000..8073753a
--- /dev/null
+++ b/ProjectSettings/MultiplayerManager.asset
@@ -0,0 +1,7 @@
+%YAML 1.1
+%TAG !u! tag:unity3d.com,2011:
+--- !u!655991488 &1
+MultiplayerManager:
+  m_ObjectHideFlags: 0
+  m_EnableMultiplayerRoles: 0
+  m_ActiveMultiplayerRole: 0
diff --git a/ProjectSettings/ProjectVersion.txt b/ProjectSettings/ProjectVersion.txt
index 2e7bb8a6..cd8dbd1c 100644
--- a/ProjectSettings/ProjectVersion.txt
+++ b/ProjectSettings/ProjectVersion.txt
@@ -1,2 +1,2 @@
-m_EditorVersion: 2022.3.15f1
-m_EditorVersionWithRevision: 2022.3.15f1 (b58023a2b463)
+m_EditorVersion: 2023.2.19f1
+m_EditorVersionWithRevision: 2023.2.19f1 (95c298372b1e)
-- 
GitLab