命名空间迁移
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
using Demo.Attr;
|
||||
using Demo.Game.Attr;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
@@ -3,7 +3,7 @@ using System.Collections.Generic;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
[CustomEditor(typeof(Demo.ScriptableObject), true)]
|
||||
[CustomEditor(typeof(Demo.Game.ScriptableObject), true)]
|
||||
public class SOEditor : Convention.AbstractCustomEditor
|
||||
{
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Demo.Attr;
|
||||
using Demo.Game.Attr;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
using Convention;
|
||||
using Demo.Attr;
|
||||
using Demo.Game.Attr;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
using Convention;
|
||||
using Demo.Attr;
|
||||
using Demo.Game.Attr;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
@@ -6,7 +6,7 @@ using Cinemachine;
|
||||
#endif
|
||||
using Convention.WindowsUI.Variant;
|
||||
using UnityEngine;
|
||||
using Demo.Attr;
|
||||
using Demo.Game.Attr;
|
||||
|
||||
namespace Demo.Game
|
||||
{
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
using Convention;
|
||||
using Demo.Attr;
|
||||
using Demo.Game.Attr;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
@@ -10,6 +10,26 @@ using UnityEngine.Rendering;
|
||||
|
||||
namespace Demo.Game
|
||||
{
|
||||
namespace ConfigType
|
||||
{
|
||||
public class DDTConfig : ScriptLoadableConfig
|
||||
{
|
||||
public NativeArray<float> Datas = new(128, Allocator.Persistent, NativeArrayOptions.UninitializedMemory);
|
||||
|
||||
public override void Deserialize(BinaryReader reader)
|
||||
{
|
||||
BinarySerializeUtility.DeserializeNativeArray(reader, ref Datas);
|
||||
base.Deserialize(reader);
|
||||
}
|
||||
|
||||
public override void Serialize(BinaryWriter writer)
|
||||
{
|
||||
BinarySerializeUtility.SerializeNativeArray(writer, Datas);
|
||||
base.Serialize(writer);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[Scriptable]
|
||||
public class DDT : ScriptableObject
|
||||
{
|
||||
@@ -48,7 +68,7 @@ namespace Demo.Game
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <20><>ȡ<EFBFBD><C8A1><EFBFBD>ݳ<EFBFBD><DDB3><EFBFBD>
|
||||
/// <20><>ȡ<EFBFBD><C8A1><EFBFBD>ݳ<EFBFBD><DDB3><EFBFBD>
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[Convention.RScript.Variable.Attr.Method]
|
||||
|
||||
@@ -59,7 +59,7 @@ namespace Demo.Editor
|
||||
{
|
||||
foreach (var type in asm.GetTypes())
|
||||
{
|
||||
if (typeof(ScriptableObject).IsAssignableFrom(type) && type.IsAbstract == false)
|
||||
if (typeof(Demo.Game.ScriptableObject).IsAssignableFrom(type) && type.IsAbstract == false)
|
||||
{
|
||||
result.Add(type.Name, type);
|
||||
}
|
||||
@@ -391,7 +391,7 @@ namespace Demo.Editor
|
||||
{
|
||||
new Convention.RScript.Variable.CStyle.CScriptRScriptVariableGenerater(type, () => generater(), null, filename).Register();
|
||||
}
|
||||
else if (typeof(ScriptableObject).IsAssignableFrom(type))
|
||||
else if (typeof(Demo.Game.ScriptableObject).IsAssignableFrom(type))
|
||||
{
|
||||
new Convention.RScript.Variable.CStyle.CScriptRScriptVariableGenerater(type, null, null, filename).Register();
|
||||
}
|
||||
|
||||
@@ -205,6 +205,7 @@ namespace Demo.Game
|
||||
rootGameObject.transform.SetParent(transform);
|
||||
rootGameObject.ScriptName = rootObject.GetName(true);
|
||||
rootGameObject.audioSystem = MainAudio;
|
||||
rootGameObject.LoadedScriptSet.Add(rootObject);
|
||||
rootGameObject.EnableScript(content.RootSourceDir, this);
|
||||
rootGameObject.SetContent(nameof(SongOffset), SongOffset);
|
||||
rootGameObject.SetContent(nameof(IsAutoPlay), IsAutoPlay ? 1 : 0);
|
||||
|
||||
@@ -17,6 +17,7 @@ namespace Demo.Game
|
||||
[Content] public GameController RootGameController;
|
||||
|
||||
public string SourcePath;
|
||||
public HashSet<string> LoadedScriptSet = new();
|
||||
|
||||
protected override IEnumerator DoSomethingDuringApplyScript()
|
||||
{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using Convention;
|
||||
using Convention.RScript;
|
||||
using Convention.WindowsUI.Variant;
|
||||
using Demo.Attr;
|
||||
using Demo.Game.Attr;
|
||||
using Demo.Game;
|
||||
using Dreamteck.Splines;
|
||||
using System;
|
||||
@@ -15,7 +15,7 @@ using Unity.VisualScripting;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Rendering;
|
||||
|
||||
namespace Demo
|
||||
namespace Demo.Game
|
||||
{
|
||||
public interface IScriptableObject
|
||||
{
|
||||
@@ -38,6 +38,8 @@ namespace Demo
|
||||
}
|
||||
}
|
||||
|
||||
namespace ConfigType
|
||||
{
|
||||
public class ScriptLoadableConfig
|
||||
{
|
||||
public Vector3 EnterGameLocalPosition, EnterGameEulerAngles, EnterGameLocalScaling;
|
||||
@@ -87,6 +89,7 @@ namespace Demo
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public partial class ScriptableObject : IScriptableObject
|
||||
{
|
||||
@@ -412,6 +415,7 @@ namespace Demo
|
||||
// 获取文件
|
||||
var file = new ToolFile(GetRoot().SourcePath);
|
||||
file = file | path;
|
||||
GetRoot().LoadedScriptSet.Add(file);
|
||||
// 找不到脚本
|
||||
if (file.Exists() == false)
|
||||
{
|
||||
|
||||
@@ -159,6 +159,8 @@ namespace Demo
|
||||
}
|
||||
}
|
||||
|
||||
namespace Game
|
||||
{
|
||||
public partial class ScriptableObject
|
||||
{
|
||||
protected virtual bool IsImptSerialize => false;
|
||||
@@ -296,4 +298,5 @@ namespace Demo
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
using Convention;
|
||||
using Demo.Attr;
|
||||
using Demo.Game.Attr;
|
||||
using System.Collections;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
@@ -8,6 +8,27 @@ using UnityEngine.SceneManagement;
|
||||
|
||||
namespace Demo.Game
|
||||
{
|
||||
namespace ConfigType
|
||||
{
|
||||
// SubWorld 配置
|
||||
public class SubWorldConfig : ScriptLoadableConfig
|
||||
{
|
||||
public string project;
|
||||
|
||||
public override void Deserialize(BinaryReader reader)
|
||||
{
|
||||
project = BinarySerializeUtility.ReadString(reader);
|
||||
base.Deserialize(reader);
|
||||
}
|
||||
|
||||
public override void Serialize(BinaryWriter writer)
|
||||
{
|
||||
BinarySerializeUtility.WriteString(writer, project);
|
||||
base.Serialize(writer);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[Scriptable]
|
||||
public class SubWorld : ScriptableObject
|
||||
{
|
||||
@@ -25,7 +46,7 @@ namespace Demo.Game
|
||||
var ir = SceneManager.LoadSceneAsync(Editor.EditorController.SceneName, LoadSceneMode.Additive);
|
||||
ir.completed += x =>
|
||||
{
|
||||
SubWorldGameController = (from controller in FindObjectsOfType<GameController>()
|
||||
SubWorldGameController = (from controller in FindObjectsByType<GameController>(FindObjectsSortMode.None)
|
||||
where controller.RootSourcePath == project
|
||||
select controller).First();
|
||||
ConventionUtility.StartCoroutine(SubWorldGameController.GameInitBySubWorld(GetRoot().InputCatch));
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
using Convention;
|
||||
using Demo.Attr;
|
||||
using Demo.Game.Attr;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
@@ -1,10 +1,32 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.IO;
|
||||
using Convention;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Demo.Game
|
||||
{
|
||||
namespace ConfigType
|
||||
{
|
||||
// IEffectHookObject 配置(抽象基类Config)
|
||||
public class IEffectHookObjectConfig : ScriptLoadableConfig
|
||||
{
|
||||
public IEffectHookObject.InteractiveEffectType MyInteractiveLevel;
|
||||
|
||||
public override void Deserialize(BinaryReader reader)
|
||||
{
|
||||
MyInteractiveLevel = (IEffectHookObject.InteractiveEffectType)BinarySerializeUtility.ReadInt(reader);
|
||||
base.Deserialize(reader);
|
||||
}
|
||||
|
||||
public override void Serialize(BinaryWriter writer)
|
||||
{
|
||||
BinarySerializeUtility.WriteInt(writer, (int)MyInteractiveLevel);
|
||||
base.Serialize(writer);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public abstract class IEffectHookObject : ScriptableObject, IHookInteraction
|
||||
{
|
||||
public enum InteractiveEffectType
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.IO;
|
||||
using Convention;
|
||||
using Demo.Editor.UI;
|
||||
using UnityEngine;
|
||||
@@ -7,6 +8,42 @@ using UnityEngine.Events;
|
||||
|
||||
namespace Demo.Game
|
||||
{
|
||||
namespace ConfigType
|
||||
{
|
||||
// IInteraction 配置(抽象基类Config,继承自TimelineScriptObject)
|
||||
public class IInteractionConfig : ScriptLoadableConfig
|
||||
{
|
||||
public Vector2 VisibleDuration;
|
||||
public Vector2 InteractiveDuration;
|
||||
public Vector2 InteractableScoreInterval;
|
||||
public Vector2 InteractableIntervalThatCanScoreBest;
|
||||
public IInteraction.JudgementLevel MyJudgementLevel;
|
||||
public IInteraction.UpdatePhase MyUpdatePhase;
|
||||
|
||||
public override void Deserialize(BinaryReader reader)
|
||||
{
|
||||
VisibleDuration = BinarySerializeUtility.ReadVec2(reader);
|
||||
InteractiveDuration = BinarySerializeUtility.ReadVec2(reader);
|
||||
InteractableScoreInterval = BinarySerializeUtility.ReadVec2(reader);
|
||||
InteractableIntervalThatCanScoreBest = BinarySerializeUtility.ReadVec2(reader);
|
||||
MyJudgementLevel = (IInteraction.JudgementLevel)BinarySerializeUtility.ReadInt(reader);
|
||||
MyUpdatePhase = (IInteraction.UpdatePhase)BinarySerializeUtility.ReadInt(reader);
|
||||
base.Deserialize(reader);
|
||||
}
|
||||
|
||||
public override void Serialize(BinaryWriter writer)
|
||||
{
|
||||
BinarySerializeUtility.WriteVec2(writer, VisibleDuration);
|
||||
BinarySerializeUtility.WriteVec2(writer, InteractiveDuration);
|
||||
BinarySerializeUtility.WriteVec2(writer, InteractableScoreInterval);
|
||||
BinarySerializeUtility.WriteVec2(writer, InteractableIntervalThatCanScoreBest);
|
||||
BinarySerializeUtility.WriteInt(writer, (int)MyJudgementLevel);
|
||||
BinarySerializeUtility.WriteInt(writer, (int)MyUpdatePhase);
|
||||
base.Serialize(writer);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public interface IHookInteraction
|
||||
{
|
||||
|
||||
|
||||
@@ -1,9 +1,27 @@
|
||||
using System.Collections;
|
||||
using System.IO;
|
||||
using Convention;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Demo.Game
|
||||
{
|
||||
namespace ConfigType
|
||||
{
|
||||
// IJudgementHookObject 配置(抽象基类Config)
|
||||
public class IJudgementHookObjectConfig : ScriptLoadableConfig
|
||||
{
|
||||
public override void Deserialize(BinaryReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
}
|
||||
|
||||
public override void Serialize(BinaryWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public abstract class IJudgementHookObject : ScriptableObject, IHookInteraction
|
||||
{
|
||||
|
||||
|
||||
@@ -1,9 +1,31 @@
|
||||
using Convention;
|
||||
using Demo.Attr;
|
||||
using Demo.Game.Attr;
|
||||
using System.IO;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Demo.Game
|
||||
{
|
||||
namespace ConfigType
|
||||
{
|
||||
// FullScreenInteraction 配置
|
||||
public class FullScreenInteractionConfig : IInteractionConfig
|
||||
{
|
||||
public bool IsNeedTap;
|
||||
|
||||
public override void Deserialize(BinaryReader reader)
|
||||
{
|
||||
IsNeedTap = BinarySerializeUtility.ReadBool(reader);
|
||||
base.Deserialize(reader);
|
||||
}
|
||||
|
||||
public override void Serialize(BinaryWriter writer)
|
||||
{
|
||||
BinarySerializeUtility.WriteBool(writer, IsNeedTap);
|
||||
base.Serialize(writer);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[Scriptable]
|
||||
public class FullScreenInteraction : IInteraction
|
||||
{
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
using Convention;
|
||||
using Demo.Attr;
|
||||
using Demo.Game.Attr;
|
||||
using NUnit.Framework.Internal;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
using Convention;
|
||||
using Demo.Attr;
|
||||
using Demo.Game.Attr;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
using Convention;
|
||||
using Demo.Attr;
|
||||
using Demo.Game.Attr;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Demo.Attr;
|
||||
using Demo.Game.Attr;
|
||||
using Dreamteck.Splines;
|
||||
using System.Collections;
|
||||
using UnityEngine;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Demo.Attr;
|
||||
using Demo.Game.Attr;
|
||||
using Dreamteck.Splines;
|
||||
using System.Collections;
|
||||
using UnityEngine;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
using Convention;
|
||||
using Demo.Attr;
|
||||
using Demo.Game.Attr;
|
||||
using Dreamteck.Splines;
|
||||
using System;
|
||||
using System.Collections;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
using Convention;
|
||||
using Demo.Attr;
|
||||
using Demo.Game.Attr;
|
||||
using Dreamteck.Splines;
|
||||
using System;
|
||||
using System.Collections;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Demo.Attr;
|
||||
using Demo.Game.Attr;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using UnityEngine;
|
||||
|
||||
@@ -1,13 +1,41 @@
|
||||
using Convention;
|
||||
using Demo.Attr;
|
||||
using Demo.Game.Attr;
|
||||
using Dreamteck.Splines;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Demo.Game
|
||||
{
|
||||
namespace ConfigType
|
||||
{
|
||||
// SplineCore 配置
|
||||
public class SplineCoreConfig : ScriptLoadableConfig
|
||||
{
|
||||
public SplineComputer.SampleMode MySampleMode;
|
||||
public Spline.Type MyType;
|
||||
public bool IsClose;
|
||||
|
||||
public override void Deserialize(BinaryReader reader)
|
||||
{
|
||||
MySampleMode = (SplineComputer.SampleMode)BinarySerializeUtility.ReadInt(reader);
|
||||
MyType = (Spline.Type)BinarySerializeUtility.ReadInt(reader);
|
||||
IsClose = BinarySerializeUtility.ReadBool(reader);
|
||||
base.Deserialize(reader);
|
||||
}
|
||||
|
||||
public override void Serialize(BinaryWriter writer)
|
||||
{
|
||||
BinarySerializeUtility.WriteInt(writer, (int)MySampleMode);
|
||||
BinarySerializeUtility.WriteInt(writer, (int)MyType);
|
||||
BinarySerializeUtility.WriteBool(writer, IsClose);
|
||||
base.Serialize(writer);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public struct SplineClipDuration
|
||||
{
|
||||
public float ClipFrom;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
using Convention;
|
||||
using Demo.Attr;
|
||||
using Demo.Game.Attr;
|
||||
using Dreamteck.Splines;
|
||||
using System.Collections;
|
||||
using UnityEngine;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using Convention;
|
||||
using Convention.WindowsUI.Variant;
|
||||
using Demo.Attr;
|
||||
using Demo.Game.Attr;
|
||||
using Dreamteck.Splines;
|
||||
using System.Collections;
|
||||
using UnityEngine;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using Convention;
|
||||
using Convention.WindowsUI.Variant;
|
||||
using Demo.Attr;
|
||||
using Demo.Game.Attr;
|
||||
using Dreamteck.Splines;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
using Convention;
|
||||
using Demo.Attr;
|
||||
using Demo.Game.Attr;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using UnityEngine;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Demo.Attr;
|
||||
using Demo.Game.Attr;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Demo.Game
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using Convention;
|
||||
using Convention.WindowsUI.Variant;
|
||||
using Demo.Attr;
|
||||
using Demo.Game.Attr;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
using Convention;
|
||||
using Demo.Attr;
|
||||
using Demo.Game.Attr;
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
using Convention;
|
||||
using Demo.Attr;
|
||||
using Demo.Game.Attr;
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using Convention;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Rendering;
|
||||
@@ -8,6 +9,23 @@ using UnityEngine.Rendering.Universal;
|
||||
|
||||
namespace Demo.Game
|
||||
{
|
||||
namespace ConfigType
|
||||
{
|
||||
// BaseVolume 配置(抽象基类Config)
|
||||
public class BaseVolumeConfig : ScriptLoadableConfig
|
||||
{
|
||||
public override void Deserialize(BinaryReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
}
|
||||
|
||||
public override void Serialize(BinaryWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public abstract class BaseVolume : ScriptableObject
|
||||
{
|
||||
[Resources, SerializeField] private Volume m_volume;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Demo.Attr;
|
||||
using Demo.Game.Attr;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Rendering.Universal;
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
using Convention;
|
||||
using Demo.Attr;
|
||||
using Demo.Game.Attr;
|
||||
using System.Collections;
|
||||
using UnityEngine;
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
using Convention;
|
||||
using Demo.Attr;
|
||||
using Demo.Game.Attr;
|
||||
using System.Collections;
|
||||
using UnityEngine;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Demo.Attr;
|
||||
using Demo.Game.Attr;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Demo.Game
|
||||
|
||||
@@ -1,11 +1,35 @@
|
||||
using Convention;
|
||||
using Demo.Attr;
|
||||
using Demo.Game.Attr;
|
||||
using System.Collections;
|
||||
using System.IO;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Rendering;
|
||||
|
||||
namespace Demo.Game
|
||||
{
|
||||
namespace ConfigType
|
||||
{
|
||||
// VolumeObject 配置
|
||||
public class VolumeObjectConfig : BaseVolumeConfig
|
||||
{
|
||||
public string MyAssetBundle, MyProfile;
|
||||
|
||||
public override void Deserialize(BinaryReader reader)
|
||||
{
|
||||
MyAssetBundle = BinarySerializeUtility.ReadString(reader);
|
||||
MyProfile = BinarySerializeUtility.ReadString(reader);
|
||||
base.Deserialize(reader);
|
||||
}
|
||||
|
||||
public override void Serialize(BinaryWriter writer)
|
||||
{
|
||||
BinarySerializeUtility.WriteString(writer, MyAssetBundle);
|
||||
BinarySerializeUtility.WriteString(writer, MyProfile);
|
||||
base.Serialize(writer);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[Scriptable]
|
||||
public class VolumeObject : BaseVolume, IAssetBundleLoader
|
||||
{
|
||||
@@ -14,7 +38,8 @@ namespace Demo.Game
|
||||
return new GameObject().AddComponent<VolumeObject>();
|
||||
}
|
||||
|
||||
[Content, SerializeField] private bool IsLoading = false;
|
||||
private bool IsLoading = false;
|
||||
[Content, SerializeField] private string MyAssetBundle, MyProfile;
|
||||
|
||||
protected override IEnumerator DoSomethingDuringApplyScript()
|
||||
{
|
||||
@@ -30,6 +55,8 @@ namespace Demo.Game
|
||||
public void Load(string ab, string profile)
|
||||
{
|
||||
IsLoading = true;
|
||||
MyAssetBundle = ab;
|
||||
MyProfile = profile;
|
||||
ConventionUtility.StartCoroutine(this.LoadAssetBundle(ab, x =>
|
||||
{
|
||||
MyVolume.profile = x.LoadAsset<VolumeProfile>(profile);
|
||||
|
||||
@@ -207,7 +207,7 @@ MonoBehaviour:
|
||||
type: {class: RenderGraphSettings, ns: UnityEngine.Rendering.Universal, asm: Unity.RenderPipelines.Universal.Runtime}
|
||||
data:
|
||||
m_Version: 0
|
||||
m_EnableRenderCompatibilityMode: 1
|
||||
m_EnableRenderCompatibilityMode: 0
|
||||
- rid: 4324738240734560265
|
||||
type: {class: UniversalRenderPipelineEditorShaders, ns: UnityEngine.Rendering.Universal, asm: Unity.RenderPipelines.Universal.Runtime}
|
||||
data:
|
||||
|
||||
Reference in New Issue
Block a user