void UpdateTriggerEffect() { if (!effectPrefab) { return; } if (triggerEffect && !preTrigger) { string path = FindPrefabPath(effectPrefab); var go = BundleHelper.LoadAndCreate(path, -1); go.transform.SetParent(gameObject.transform, false); } preTrigger = triggerEffect; }
public static LuaBinderBehaviour Create(string bundleName, int ttl, LuaTable lua) { #if PROFILE_FILE #if PROFILE_GO_NAME Profiler.BeginSample("LuaBinderBehaviour.Create " + bundleName + " ttl=" + ttl); #else Profiler.BeginSample("LuaBinderBehaviour.Create"); #endif // PROFILE_GO_NAME #endif // PROFILE_FILE var go = BundleHelper.LoadAndCreate(bundleName, ttl); var binder = go.AddComponent <LuaBinderBehaviour>(); binder.Bind(lua); #if PROFILE_FILE Profiler.EndSample(); #endif return(binder); }