using System; using System.Collections.Generic; using System.ComponentModel; using Cysharp.Threading.Tasks; using Framework; using Framework.Wrapper; using Gameplay; using Gameplay.Area; using Gameplay.Character; using Gameplay.Level; using Gameplay.SubSystems; using PhxhSDK; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.ResourceManagement; using CharacterInfo = Gameplay.Net.CharacterInfo; using Constants = Framework.Constants; using Object = UnityEngine.Object; public partial class SROptions { private List _testMatList = new(); [Category("Test")] public void TestMonoScriptReferenceStart() { var path = "Assets/Art/AutoGen/PostProcessScenes/Assets_Scenes_CampScene/Combined/NLD_URP_NLD_Scene_Lambert/CombieMat.mat"; var mat = Addressables.LoadAssetAsync(path).WaitForCompletion(); _testMatList.Add(mat); Debug.LogError($"test reference:{_testMatList[0].name}"); } [Category("Test")] public void TestMonoScriptReferenceEnd() { var path = "Assets/Art/AutoGen/PostProcessScenes/Assets_Scenes_CampScene/Combined/NLD_URP_NLD_Scene_Lambert/CombieMat.mat"; Addressables.Release(_testMatList[0]); Debug.LogError($"test reference:{_testMatList[0].name}"); } private TestUnityObjectReference TestUnityObjectReference { get { var result = Object.FindObjectOfType(); if (result == null) { var go = new GameObject("test"); result = go.AddComponent(); } return result; } } [Category("Test")] public void TestUnityObjectReferenceStart() { TestUnityObjectReference.Test(); } [Category("Test")] public void TestUnityObjectReferenceEnd() { TestUnityObjectReference.TestEnd(); } [Category("Test")] public void TestUnityObjectSerializableReferenceStart() { TestUnityObjectReference.TestSerializable(); } [Category("Test")] public void TestUnityObjectSerializableReferenceEnd() { TestUnityObjectReference.TestSerializableEnd(); } [Category("Test")] public void TestSingleUnityObjectReferenceStart() { TestUnityObjectReference.TestSingleStart(); } [Category("Test")] public void TestSingleUnityObjectReferenceEnd() { TestUnityObjectReference.TestSingleEnd(); } [Category("Test")] public void TestSingleSerializableUnityObjectReferenceStart() { TestUnityObjectReference.TestSingleSerializableStart(); } [Category("Test")] public void TestSingleSerializableUnityObjectReferenceEnd() { TestUnityObjectReference.TestSingleSerializableEnd(); } }