diff options
| author | chai <chaifix@163.com> | 2021-08-30 21:11:54 +0800 |
|---|---|---|
| committer | chai <chaifix@163.com> | 2021-08-30 21:11:54 +0800 |
| commit | 86ec4522be1d0b932006801c7bf2297adc9f0028 (patch) | |
| tree | 551739eaff15f0a1990f997409da8926979ba85a /Assets/Scripts/Unit/TimelineEventProxy.cs | |
| parent | 07fd372981a16672af23e30816ade14fcb744804 (diff) | |
*misc
Diffstat (limited to 'Assets/Scripts/Unit/TimelineEventProxy.cs')
| -rw-r--r-- | Assets/Scripts/Unit/TimelineEventProxy.cs | 7 |
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) |
