From 86ec4522be1d0b932006801c7bf2297adc9f0028 Mon Sep 17 00:00:00 2001 From: chai Date: Mon, 30 Aug 2021 21:11:54 +0800 Subject: *misc --- Assets/Scripts/Unit/TimelineEventProxy.cs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'Assets/Scripts/Unit/TimelineEventProxy.cs') diff --git a/Assets/Scripts/Unit/TimelineEventProxy.cs b/Assets/Scripts/Unit/TimelineEventProxy.cs index cb30e900..bb598666 100644 --- a/Assets/Scripts/Unit/TimelineEventProxy.cs +++ b/Assets/Scripts/Unit/TimelineEventProxy.cs @@ -3,9 +3,6 @@ using System.Collections; using System.Reflection; using System.Collections.Generic; using UnityEngine; -#if UNITY_EDITOR -using UnityEditor; -#endif // 执行帧事件 [DisallowMultipleComponent] @@ -105,8 +102,7 @@ public partial class TimelineEventProxy if (effect == null) return; string path = effect.effectPath; -#if UNITY_EDITOR - GameObject prefab = AssetDatabase.LoadAssetAtPath(path, typeof(GameObject)) as GameObject; + GameObject prefab = ResourceManager.Instance.LoadAsset(path); if (prefab != null) { GameObject root = new GameObject(); @@ -117,7 +113,6 @@ public partial class TimelineEventProxy onClear.RunInEditor = true; onClear.Initialize(new PlayEffectInfo(path, EffectPlayTypes.Oneshot, m_Root, effect.position, effect.rotation, effect.scale, 0, false)); } -#endif } void EventCamera_Shake(AnimationEventBase animEvent) -- cgit v1.1-26-g67d0