summaryrefslogtreecommitdiff
path: root/Assets/Scripts/Unit/TimelineEventProxy.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Assets/Scripts/Unit/TimelineEventProxy.cs')
-rw-r--r--Assets/Scripts/Unit/TimelineEventProxy.cs7
1 files changed, 1 insertions, 6 deletions
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<GameObject>(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)