Skip to content

Commit

Permalink
Update Unity version and fix errors (#1071)
Browse files Browse the repository at this point in the history
  • Loading branch information
joaoburatto authored Mar 5, 2023
1 parent e0412a0 commit ebbb6bd
Show file tree
Hide file tree
Showing 22 changed files with 105 additions and 80 deletions.
2 changes: 1 addition & 1 deletion Assets/Scripts/SS3D/Core/ApplicationStateSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ private void InitializeDiscordIntegration()
}
else
{
FindObjectOfType<DiscordManager>().Destroy();
Destroy(FindObjectOfType<DiscordManager>());
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public bool ClientUpdate(InteractionEvent interactionEvent)
/// <inheritdoc />
public void ClientCancel(InteractionEvent interactionEvent)
{
_loadingBarInstance.Destroy();
_loadingBarInstance.Dispose(true);
}
}
}
2 changes: 1 addition & 1 deletion Assets/Scripts/SS3D/Interactions/LoadingBar.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ private void UpdateLoadingProgressTask()
{
if (StartTime + Duration < Time.time)
{
GameObjectCache.Destroy();
GameObjectCache.Dispose(true);
return;
}

Expand Down
4 changes: 2 additions & 2 deletions Assets/Scripts/SS3D/Interactions/UI/InteractionMenuView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ private void Update()

if (!hasSelfAsParent)
{
gameObject.Destroy();
gameObject.Dispose(true);
}
}

Expand All @@ -92,7 +92,7 @@ private void UpdateInteractions()
button.GetComponentInChildren<TextMeshProUGUI>().text = interaction.GetName(Event);
button.GetComponent<Button>().onClick.AddListener(() =>
{
GameObjectCache.Destroy();
GameObjectCache.Dispose(true);
OnSelect?.Invoke(interaction);
});
}
Expand Down
2 changes: 1 addition & 1 deletion Assets/Scripts/SS3D/Systems/Entities/EntitySystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ private void DestroySpawnedPlayers()
foreach (Entity player in SpawnedPlayers)
{
ServerManager.Despawn(player.NetworkObject);
player.GameObjectCache.Destroy();
player.GameObjectCache.Dispose(true);
}

_hasSpawnedInitialPlayers = false;
Expand Down
2 changes: 1 addition & 1 deletion Assets/Scripts/SS3D/Systems/Gamemodes/Modes/Gamemode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ private void DestroyAllObjectives()
{
foreach (GamemodeObjective gamemodeObjective in _roundObjectives)
{
gamemodeObjective.Destroy();
gamemodeObjective.Dispose(true);
}
_roundObjectives.Clear();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ private void ClearObjectivesList()
{
foreach (KeyValuePair<int,GamemodeObjectiveItemView> view in _gamemodeObjectiveItems)
{
view.Value.GameObjectCache.Destroy();
view.Value.GameObjectCache.Dispose(true);
}

_gamemodeObjectiveItems.Clear();
Expand Down
4 changes: 2 additions & 2 deletions Assets/Scripts/SS3D/Systems/Health/HealthController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ private void BecomeGhost(GameObject player, GameObject ghost)
[ObserversRpc]
private void destroyObjects(Entity originEntity, Entity ghostEntity)
{
originEntity.gameObject.GetComponent<StaminaController>().Destroy();
originEntity.gameObject.GetComponent<HumanoidController>().Destroy();
originEntity.gameObject.GetComponent<StaminaController>().Dispose(true);
originEntity.gameObject.GetComponent<HumanoidController>().Dispose(true);
originEntity.gameObject.transform.Rotate(new Vector3(90, 0, 0));
ghostEntity.transform.position = originEntity.transform.position;
ghostEntity.transform.rotation = originEntity.transform.rotation;
Expand Down
8 changes: 4 additions & 4 deletions Assets/Scripts/SS3D/Systems/Input/Controls.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was auto-generated by com.unity.inputsystem:InputActionCodeGenerator
// version 1.3.0
// version 1.4.4
// from Assets/Content/Input/Controls.inputactions
//
// Changes to this file may cause incorrect behavior and will be lost if
Expand Down Expand Up @@ -517,7 +517,7 @@ public @Controls()
""initialStateCheck"": false
},
{
""name"": ""ToggleMenu"",
""name"": ""Toggle Menu"",
""type"": ""Button"",
""id"": ""3425a866-8013-4556-bd14-6f493998eb0c"",
""expectedControlType"": ""Button"",
Expand Down Expand Up @@ -587,7 +587,7 @@ public @Controls()
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""ToggleMenu"",
""action"": ""Toggle Menu"",
""isComposite"": false,
""isPartOfComposite"": false
},
Expand Down Expand Up @@ -636,7 +636,7 @@ public @Controls()
m_Other_SwapMinds = m_Other.FindAction("Swap Minds", throwIfNotFound: true);
m_Other_PrimaryClick = m_Other.FindAction("Primary Click", throwIfNotFound: true);
m_Other_SecondaryClick = m_Other.FindAction("Secondary Click", throwIfNotFound: true);
m_Other_ToggleMenu = m_Other.FindAction("ToggleMenu", throwIfNotFound: true);
m_Other_ToggleMenu = m_Other.FindAction("Toggle Menu", throwIfNotFound: true);
m_Other_SpawnCans = m_Other.FindAction("Spawn Cans", throwIfNotFound: true);
}

Expand Down
2 changes: 1 addition & 1 deletion Assets/Scripts/SS3D/Systems/Inventory/UI/ContainerUi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public AttachedContainer AttachedContainer
public void Close()
{
Inventory.CmdContainerClose(_attachedContainer);
gameObject.Destroy();
gameObject.Dispose(true);
}

private void UpdateContainer(Container container)
Expand Down
2 changes: 1 addition & 1 deletion Assets/Scripts/SS3D/Systems/Inventory/UI/InventoryView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ private void InventoryOnContainerClosed(AttachedContainer container)
continue;
}

_containerDisplays[i].UiElement.Destroy();
_containerDisplays[i].UiElement.Dispose(true);
_containerDisplays.RemoveAt(i);
return;
}
Expand Down
2 changes: 1 addition & 1 deletion Assets/Scripts/SS3D/Systems/Inventory/UI/ItemGrid.cs
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ private void ContainerOnContentsChanged(Container container, IEnumerable<Item> o
}

_gridItems.RemoveAt(i);
gridItem.gameObject.Destroy();
gridItem.gameObject.Dispose(true);
break;
}
}
Expand Down
2 changes: 1 addition & 1 deletion Assets/Scripts/SS3D/Systems/Inventory/UI/ItemGridItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ public override void OnDropAccepted()
{
base.OnDropAccepted();
(InventoryDisplayElement as ItemGrid)?.RemoveGridItem(this);
gameObject.Destroy();
gameObject.Dispose(true);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -114,13 +114,13 @@ private void RemoveUsernameUI(string ckey)
foreach (PlayerUsernameView playerUsernameUI in _playerUsernames.Where(playerUsernameUI => playerUsernameUI.Name.Equals(ckey)))
{
removedUsername = playerUsernameUI;
playerUsernameUI.gameObject.Destroy();
playerUsernameUI.gameObject.Dispose(true);
}

if (removedUsername != null)
{
_playerUsernames.Remove(removedUsername);
removedUsername.gameObject.Destroy();
removedUsername.gameObject.Dispose(true);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ private void DisableObjects()

foreach (GameObject o in _objectsToDisable.Where(o => o != null))
{
o.Destroy();
o.Dispose(true);
}
}
}
Expand Down
10 changes: 4 additions & 6 deletions Assets/Scripts/SS3D/Systems/Tile/TileMapCreator/GhostManager.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
using SS3D.Core.Behaviours;
using SS3D.Systems.Tile;
using System.Collections;
using System.Collections.Generic;
using Coimbra;
using UnityEngine;
using Actor = SS3D.Core.Behaviours.Actor;

namespace SS3D.Systems.Tile.UI
namespace SS3D.Systems.Tile.TileMapCreator
{
/// <summary>
/// Class for creating and managing ghost objects used by the TileMapCreator.
Expand Down Expand Up @@ -45,7 +43,7 @@ public void DestroyGhost()
{
if (_ghostObject != null)
{
Destroy(_ghostObject);
_ghostObject.Dispose(true);
_ghostObject = null;
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using Coimbra;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
Expand All @@ -11,6 +12,7 @@
using FishNet.Connection;
using SS3D.Logging;
using SS3D.Core.Behaviours;
using SS3D.Systems.Tile.TileMapCreator;

namespace SS3D.Systems.Tile.UI
{
Expand Down Expand Up @@ -264,7 +266,7 @@ private void ClearGrid()
{
for (int i = 0; i < _contentRoot.transform.childCount; i++)
{
Destroy(_contentRoot.transform.GetChild(i).gameObject);
_contentRoot.transform.GetChild(i).gameObject.Dispose(true);
}
}

Expand Down
14 changes: 7 additions & 7 deletions Packages/manifest.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
{
"dependencies": {
"com.coimbrastudios.core": "10.8.1",
"com.coimbrastudios.core": "11.0.5",
"com.cysharp.unitask": "https://github.com/Cysharp/UniTask.git?path=src/UniTask/Assets/Plugins/UniTask",
"com.johannesmp.unityscenereference": "1.1.1",
"com.unity.2d.sprite": "1.0.0",
"com.unity.collab-proxy": "1.15.15",
"com.unity.ide.rider": "3.0.13",
"com.unity.ide.visualstudio": "2.0.14",
"com.unity.collab-proxy": "1.17.7",
"com.unity.ide.rider": "3.0.16",
"com.unity.ide.visualstudio": "2.0.16",
"com.unity.ide.vscode": "1.2.5",
"com.unity.inputsystem": "1.3.0",
"com.unity.postprocessing": "3.2.1",
"com.unity.shadergraph": "12.1.6",
"com.unity.inputsystem": "1.4.4",
"com.unity.postprocessing": "3.2.2",
"com.unity.shadergraph": "12.1.8",
"com.unity.test-framework": "1.1.31",
"com.unity.textmeshpro": "3.0.6",
"com.unity.toolchain.linux-x86_64": "2.0.2",
Expand Down
50 changes: 25 additions & 25 deletions Packages/packages-lock.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
{
"dependencies": {
"com.coimbrastudios.core": {
"version": "10.8.1",
"version": "11.0.5",
"depth": 0,
"source": "registry",
"dependencies": {
"com.cysharp.unitask": "2.3.1",
"com.unity.addressables": "1.18.19",
"com.unity.ide.rider": "3.0.14",
"com.unity.ide.vscode": "1.2.5",
"com.unity.ide.visualstudio": "2.0.15",
"com.unity.ide.rider": "3.0.15",
"com.unity.ide.visualstudio": "2.0.16",
"com.unity.profiling.core": "1.0.2",
"com.unity.roslyn": "0.2.2-preview",
"com.unity.ugui": "1.0.0"
},
"url": "https://package.openupm.com"
Expand Down Expand Up @@ -51,7 +49,7 @@
"url": "https://packages.unity.com"
},
"com.unity.collab-proxy": {
"version": "1.15.15",
"version": "1.17.7",
"depth": 0,
"source": "registry",
"dependencies": {
Expand All @@ -67,17 +65,17 @@
"url": "https://packages.unity.com"
},
"com.unity.ide.rider": {
"version": "3.0.14",
"depth": 1,
"version": "3.0.16",
"depth": 0,
"source": "registry",
"dependencies": {
"com.unity.ext.nunit": "1.0.6"
},
"url": "https://packages.unity.com"
},
"com.unity.ide.visualstudio": {
"version": "2.0.15",
"depth": 1,
"version": "2.0.16",
"depth": 0,
"source": "registry",
"dependencies": {
"com.unity.test-framework": "1.1.9"
Expand All @@ -92,16 +90,23 @@
"url": "https://packages.unity.com"
},
"com.unity.inputsystem": {
"version": "1.3.0",
"version": "1.4.4",
"depth": 0,
"source": "registry",
"dependencies": {
"com.unity.modules.uielements": "1.0.0"
},
"url": "https://packages.unity.com"
},
"com.unity.nuget.newtonsoft-json": {
"version": "3.0.2",
"depth": 2,
"source": "registry",
"dependencies": {},
"url": "https://packages.unity.com"
},
"com.unity.postprocessing": {
"version": "3.2.1",
"version": "3.2.2",
"depth": 0,
"source": "registry",
"dependencies": {
Expand All @@ -117,7 +122,7 @@
"url": "https://packages.unity.com"
},
"com.unity.render-pipelines.core": {
"version": "12.1.6",
"version": "12.1.8",
"depth": 1,
"source": "builtin",
"dependencies": {
Expand All @@ -126,15 +131,8 @@
"com.unity.modules.jsonserialize": "1.0.0"
}
},
"com.unity.roslyn": {
"version": "0.2.2-preview",
"depth": 1,
"source": "registry",
"dependencies": {},
"url": "https://packages.unity.com"
},
"com.unity.scriptablebuildpipeline": {
"version": "1.19.6",
"version": "1.20.1",
"depth": 2,
"source": "registry",
"dependencies": {},
Expand All @@ -148,20 +146,22 @@
"url": "https://packages.unity.com"
},
"com.unity.services.core": {
"version": "1.0.1",
"version": "1.6.0",
"depth": 1,
"source": "registry",
"dependencies": {
"com.unity.modules.unitywebrequest": "1.0.0"
"com.unity.modules.unitywebrequest": "1.0.0",
"com.unity.nuget.newtonsoft-json": "3.0.2",
"com.unity.modules.androidjni": "1.0.0"
},
"url": "https://packages.unity.com"
},
"com.unity.shadergraph": {
"version": "12.1.6",
"version": "12.1.8",
"depth": 0,
"source": "builtin",
"dependencies": {
"com.unity.render-pipelines.core": "12.1.6",
"com.unity.render-pipelines.core": "12.1.8",
"com.unity.searcher": "4.9.1"
}
},
Expand Down
Loading

0 comments on commit ebbb6bd

Please sign in to comment.