diff --git a/AlembicImporter/Assets/UTJ/Alembic/Scripts/Importer/AbcAPI.cs b/AlembicImporter/Assets/UTJ/Alembic/Scripts/Importer/AbcAPI.cs index 790e16a6c..fea42e778 100644 --- a/AlembicImporter/Assets/UTJ/Alembic/Scripts/Importer/AbcAPI.cs +++ b/AlembicImporter/Assets/UTJ/Alembic/Scripts/Importer/AbcAPI.cs @@ -490,7 +490,7 @@ static void ImportEnumerator(aiObject obj, IntPtr userData) // Find targetted child GameObj AlembicTreeNode childTreeNode = null; GameObject childGO = null; - var childTransf = treeNode.linkedGameObj.transform.FindChild(childName); + var childTransf = treeNode.linkedGameObj.transform.Find(childName); if (childTransf == null) { if (!ic.createMissingNodes) diff --git a/AlembicImporter/Assets/UTJ/Alembic/Scripts/Importer/AlembicMaterial.cs b/AlembicImporter/Assets/UTJ/Alembic/Scripts/Importer/AlembicMaterial.cs index b8f9106e5..6534a9194 100644 --- a/AlembicImporter/Assets/UTJ/Alembic/Scripts/Importer/AlembicMaterial.cs +++ b/AlembicImporter/Assets/UTJ/Alembic/Scripts/Importer/AlembicMaterial.cs @@ -68,7 +68,7 @@ void Update() MeshRenderer splitRenderer = null; - Transform split = gameObject.transform.FindChild(gameObject.name + "_split_" + submesh.splitIndex); + Transform split = gameObject.transform.Find(gameObject.name + "_split_" + submesh.splitIndex); if (split == null) { @@ -213,7 +213,7 @@ public void UpdateAssignments(List assignments) static GameObject SearchNodeInstance(Transform parent, string name, int instNum, ref int curInst) { - Transform node = parent.FindChild(name); + Transform node = parent.Find(name); if (node != null) { @@ -264,7 +264,7 @@ static GameObject FindNode(GameObject root, string path, int instNum) while (curNode != null && curPath < paths.Length) { - Transform child = curNode.FindChild(paths[curPath]); + Transform child = curNode.Find(paths[curPath]); if (child == null) { diff --git a/AlembicImporter/Assets/UTJ/Alembic/Scripts/Importer/AlembicMesh.cs b/AlembicImporter/Assets/UTJ/Alembic/Scripts/Importer/AlembicMesh.cs index e59e9db8e..1d4a10e5d 100644 --- a/AlembicImporter/Assets/UTJ/Alembic/Scripts/Importer/AlembicMesh.cs +++ b/AlembicImporter/Assets/UTJ/Alembic/Scripts/Importer/AlembicMesh.cs @@ -345,7 +345,7 @@ public override void AbcUpdate() { string name = AlembicTreeNode.linkedGameObj.name + "_split_" + s; - Transform trans = AlembicTreeNode.linkedGameObj.transform.FindChild(name); + Transform trans = AlembicTreeNode.linkedGameObj.transform.Find(name); if (trans == null) { diff --git a/AlembicImporter/Assets/UTJ/Alembic/Scripts/Timeline/AlembicShotAsset.cs b/AlembicImporter/Assets/UTJ/Alembic/Scripts/Timeline/AlembicShotAsset.cs index f925573dc..9836927b7 100644 --- a/AlembicImporter/Assets/UTJ/Alembic/Scripts/Timeline/AlembicShotAsset.cs +++ b/AlembicImporter/Assets/UTJ/Alembic/Scripts/Timeline/AlembicShotAsset.cs @@ -31,18 +31,17 @@ public class AlembicShotAsset : PlayableAsset, ITimelineClipAsset public ClipCaps clipCaps { get { return ClipCaps.None; } } - public override PlayableHandle CreatePlayable(PlayableGraph graph, GameObject owner) + public override Playable CreatePlayable(PlayableGraph graph, GameObject owner) { - var handle = graph.CreateScriptPlayable(); - - var playable = handle.GetObject(); - m_Stream = m_StreamPlayer.Resolve(graph.resolver); - playable.streamPlayer = m_Stream; - playable.m_StartTimeOffset = m_StartOffset; - playable.m_EndTimeClipOff = m_EndOffset; - playable.m_TimeScale = m_TimeScale; - playable.m_Cycle = m_Cycle; - return handle; + var playable = ScriptPlayable.Create(graph); + var behaviour = playable.GetBehaviour(); + m_Stream = m_StreamPlayer.Resolve(graph.GetResolver()); + behaviour.streamPlayer = m_Stream; + behaviour.m_StartTimeOffset = m_StartOffset; + behaviour.m_EndTimeClipOff = m_EndOffset; + behaviour.m_TimeScale = m_TimeScale; + behaviour.m_Cycle = m_Cycle; + return playable; } public override double duration diff --git a/AlembicImporter/Assets/UTJ/Alembic/Scripts/Timeline/AlembicShotPlayable.cs b/AlembicImporter/Assets/UTJ/Alembic/Scripts/Timeline/AlembicShotPlayable.cs index 3dc7608b9..db7e4c728 100644 --- a/AlembicImporter/Assets/UTJ/Alembic/Scripts/Timeline/AlembicShotPlayable.cs +++ b/AlembicImporter/Assets/UTJ/Alembic/Scripts/Timeline/AlembicShotPlayable.cs @@ -5,7 +5,7 @@ namespace UTJ.Alembic { - public class AlembicShotPlayable : ScriptPlayable + public class AlembicShotPlayable : PlayableBehaviour { public AlembicStreamPlayer streamPlayer { get; set; } @@ -16,9 +16,9 @@ public class AlembicShotPlayable : ScriptPlayable public float m_TimeScale; public AlembicPlaybackSettings.CycleType m_Cycle = AlembicPlaybackSettings.CycleType.Hold; - public override void ProcessFrame(FrameData info, object playerData) + public override void ProcessFrame(Playable playable, FrameData info, object playerData) { - base.ProcessFrame(info, playerData); + base.ProcessFrame(playable, info, playerData); if (streamPlayer == null) return; @@ -28,7 +28,7 @@ public override void ProcessFrame(FrameData info, object playerData) streamPlayer.m_PlaybackSettings.m_timeOffset = (float)m_StartTimeOffset; streamPlayer.m_PlaybackSettings.m_endTime = (float)streamPlayer.m_PlaybackSettings.m_duration - m_EndTimeClipOff; streamPlayer.m_PlaybackSettings.m_timeScale = (float)m_TimeScale; - streamPlayer.m_PlaybackSettings.m_Time = (float)handle.time; + streamPlayer.m_PlaybackSettings.m_Time = (float)playable.GetTime(); streamPlayer.m_PlaybackSettings.m_OverrideTime = true; streamPlayer.m_PlaybackSettings.m_preserveStartTime = true; } diff --git a/AlembicImporter/ProjectSettings/ProjectVersion.txt b/AlembicImporter/ProjectSettings/ProjectVersion.txt index ca09a3dad..239668ad6 100644 --- a/AlembicImporter/ProjectSettings/ProjectVersion.txt +++ b/AlembicImporter/ProjectSettings/ProjectVersion.txt @@ -1 +1 @@ -m_EditorVersion: 5.6.0f3 +m_EditorVersion: 2017.1.0b3