private void Start() { if (!player) { player = FirstPersonCamera.player; } zoomIn = GetComponent <PlayableDirector>(); if (!padParent || !player || !zoomIn) // 에러 방지. 뭐라도 하나라도 없으면... { tag = "Untagged"; Destroy(GetComponent <Collider>()); Destroy(GetComponent <QuickOutline>()); Destroy(this, 1f); return; } // 타임라인에 MainCamera 직접 바인딩. Why? > 에디터에서 드래그앤드랍 해도 다른 Scene이라서 로딩시에 missing. UnityEngine.Timeline.TimelineAsset timeline = zoomIn.playableAsset as UnityEngine.Timeline.TimelineAsset; zoomIn.SetGenericBinding(timeline.GetOutputTrack(3), Camera.main.gameObject); timelineDuration = timeline.duration; cam = GameObject.FindWithTag("MainCamera").GetComponent <Camera>(); rigid = GetComponent <Rigidbody>(); beforePoint = Vector3.zero; midPoint = cam.pixelRect.max / 2f; // 화면의 중앙 픽셀 위치. Handle.enabled = false; }
static int GetRootTracks(IntPtr L) { try { ToLua.CheckArgsCount(L, 1); UnityEngine.Timeline.TimelineAsset obj = (UnityEngine.Timeline.TimelineAsset)ToLua.CheckObject <UnityEngine.Timeline.TimelineAsset>(L, 1); System.Collections.Generic.IEnumerable <UnityEngine.Timeline.TrackAsset> o = obj.GetRootTracks(); ToLua.PushObject(L, o); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int DeleteTrack(IntPtr L) { try { ToLua.CheckArgsCount(L, 2); UnityEngine.Timeline.TimelineAsset obj = (UnityEngine.Timeline.TimelineAsset)ToLua.CheckObject <UnityEngine.Timeline.TimelineAsset>(L, 1); UnityEngine.Timeline.TrackAsset arg0 = (UnityEngine.Timeline.TrackAsset)ToLua.CheckObject <UnityEngine.Timeline.TrackAsset>(L, 2); bool o = obj.DeleteTrack(arg0); LuaDLL.lua_pushboolean(L, o); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int GatherProperties(IntPtr L) { try { ToLua.CheckArgsCount(L, 3); UnityEngine.Timeline.TimelineAsset obj = (UnityEngine.Timeline.TimelineAsset)ToLua.CheckObject <UnityEngine.Timeline.TimelineAsset>(L, 1); UnityEngine.Playables.PlayableDirector arg0 = (UnityEngine.Playables.PlayableDirector)ToLua.CheckObject <UnityEngine.Playables.PlayableDirector>(L, 2); UnityEngine.Timeline.IPropertyCollector arg1 = (UnityEngine.Timeline.IPropertyCollector)ToLua.CheckObject <UnityEngine.Timeline.IPropertyCollector>(L, 3); obj.GatherProperties(arg0, arg1); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int GetOutputTrack(IntPtr L) { try { ToLua.CheckArgsCount(L, 2); UnityEngine.Timeline.TimelineAsset obj = (UnityEngine.Timeline.TimelineAsset)ToLua.CheckObject <UnityEngine.Timeline.TimelineAsset>(L, 1); int arg0 = (int)LuaDLL.luaL_checknumber(L, 2); UnityEngine.Timeline.TrackAsset o = obj.GetOutputTrack(arg0); ToLua.Push(L, o); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int get_editorSettings(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); UnityEngine.Timeline.TimelineAsset obj = (UnityEngine.Timeline.TimelineAsset)o; UnityEngine.Timeline.TimelineAsset.EditorSettings ret = obj.editorSettings; ToLua.PushObject(L, ret); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o, "attempt to index editorSettings on a nil value")); } }
static int get_fixedDuration(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); UnityEngine.Timeline.TimelineAsset obj = (UnityEngine.Timeline.TimelineAsset)o; double ret = obj.fixedDuration; LuaDLL.lua_pushnumber(L, ret); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o, "attempt to index fixedDuration on a nil value")); } }
static int get_durationMode(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); UnityEngine.Timeline.TimelineAsset obj = (UnityEngine.Timeline.TimelineAsset)o; UnityEngine.Timeline.TimelineAsset.DurationMode ret = obj.durationMode; ToLua.Push(L, ret); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o, "attempt to index durationMode on a nil value")); } }
static int set_fixedDuration(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); UnityEngine.Timeline.TimelineAsset obj = (UnityEngine.Timeline.TimelineAsset)o; double arg0 = (double)LuaDLL.luaL_checknumber(L, 2); obj.fixedDuration = arg0; return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o, "attempt to index fixedDuration on a nil value")); } }
static int set_durationMode(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); UnityEngine.Timeline.TimelineAsset obj = (UnityEngine.Timeline.TimelineAsset)o; UnityEngine.Timeline.TimelineAsset.DurationMode arg0 = (UnityEngine.Timeline.TimelineAsset.DurationMode)ToLua.CheckObject(L, 2, typeof(UnityEngine.Timeline.TimelineAsset.DurationMode)); obj.durationMode = arg0; return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o, "attempt to index durationMode on a nil value")); } }
static int get_rootTrackCount(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); UnityEngine.Timeline.TimelineAsset obj = (UnityEngine.Timeline.TimelineAsset)o; int ret = obj.rootTrackCount; LuaDLL.lua_pushinteger(L, ret); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o, "attempt to index rootTrackCount on a nil value")); } }
static int get_clipCaps(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); UnityEngine.Timeline.TimelineAsset obj = (UnityEngine.Timeline.TimelineAsset)o; UnityEngine.Timeline.ClipCaps ret = obj.clipCaps; ToLua.Push(L, ret); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o, "attempt to index clipCaps on a nil value")); } }
static int get_outputs(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); UnityEngine.Timeline.TimelineAsset obj = (UnityEngine.Timeline.TimelineAsset)o; System.Collections.Generic.IEnumerable <UnityEngine.Playables.PlayableBinding> ret = obj.outputs; ToLua.PushObject(L, ret); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o, "attempt to index outputs on a nil value")); } }
static int CreatePlayable(IntPtr L) { try { ToLua.CheckArgsCount(L, 3); UnityEngine.Timeline.TimelineAsset obj = (UnityEngine.Timeline.TimelineAsset)ToLua.CheckObject <UnityEngine.Timeline.TimelineAsset>(L, 1); UnityEngine.Playables.PlayableGraph arg0 = StackTraits <UnityEngine.Playables.PlayableGraph> .Check(L, 2); UnityEngine.GameObject arg1 = (UnityEngine.GameObject)ToLua.CheckObject(L, 3, typeof(UnityEngine.GameObject)); UnityEngine.Playables.Playable o = obj.CreatePlayable(arg0, arg1); ToLua.PushValue(L, o); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int CreateTrack(IntPtr L) { try { ToLua.CheckArgsCount(L, 4); UnityEngine.Timeline.TimelineAsset obj = (UnityEngine.Timeline.TimelineAsset)ToLua.CheckObject <UnityEngine.Timeline.TimelineAsset>(L, 1); System.Type arg0 = ToLua.CheckMonoType(L, 2); UnityEngine.Timeline.TrackAsset arg1 = (UnityEngine.Timeline.TrackAsset)ToLua.CheckObject <UnityEngine.Timeline.TrackAsset>(L, 3); string arg2 = ToLua.CheckString(L, 4); UnityEngine.Timeline.TrackAsset o = obj.CreateTrack(arg0, arg1, arg2); ToLua.Push(L, o); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int _CreateUnityEngine_Timeline_TimelineAsset(IntPtr L) { try { int count = LuaDLL.lua_gettop(L); if (count == 0) { UnityEngine.Timeline.TimelineAsset obj = new UnityEngine.Timeline.TimelineAsset(); ToLua.Push(L, obj); return(1); } else { return(LuaDLL.luaL_throw(L, "invalid arguments to ctor method: UnityEngine.Timeline.TimelineAsset.New")); } } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
private void OnValidate() { this.editorSettings.fps = TimelineAsset.GetValidFramerate(this.editorSettings.fps); }