NLDClient-yudde/ProjectNLD/Assets/Code/Scripts/Gameplay/Debug/SROptions.Test.cs

50 lines
1.4 KiB
C#

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;
public partial class SROptions
{
private List<Material> _testMatList = new();
[Category("Test")]
public void TestMonoScriptReference()
{
var path =
"Assets/Art/AutoGen/PostProcessScenes/Assets_Scenes_CampScene/Combined/NLD_URP_NLD_Scene_Lambert/CombieMat.mat";
var mat = Addressables.LoadAssetAsync<Material>(path).WaitForCompletion();
_testMatList.Add(mat);
Addressables.Release(mat);
Debug.LogError($"test reference:{_testMatList[0].name}");
}
[Category("Test")]
public void TestUnityObjectReference()
{
var go = new GameObject("test");
var test = go.AddComponent<TestUnityObjectReference>();
test.Test();
}
[Category("Test")]
public void TestUnityObjectSerializableReference()
{
var go = new GameObject("test");
var test = go.AddComponent<TestUnityObjectReference>();
test.TestSerializable();
}
}