public override void GatherProperties(PlayableDirector director, IPropertyCollector driver) { SkeletonGraphic skeletonGraphic = (SkeletonGraphic)director.GetGenericBinding(this); if (skeletonGraphic != null) { driver.AddFromComponent(skeletonGraphic.gameObject, skeletonGraphic); } }
public override void GatherProperties(PlayableDirector director, IPropertyCollector driver) { SkeletonAnimation skeletonAnimation = (SkeletonAnimation)director.GetGenericBinding(this); if (skeletonAnimation != null) { driver.AddFromComponent(skeletonAnimation.gameObject, skeletonAnimation); } }
public void GatherProperties(PlayableDirector director, IPropertyCollector driver) { if (!(director == null)) { if (!ControlPlayableAsset.s_ProcessedDirectors.Contains(director)) { ControlPlayableAsset.s_ProcessedDirectors.Add(director); GameObject gameObject = this.sourceGameObject.Resolve(director); if (gameObject != null) { if (this.updateParticle) { foreach (ParticleSystem particleSystem in this.GetComponent <ParticleSystem>(gameObject)) { driver.AddFromName <ParticleSystem>(particleSystem.gameObject, "randomSeed"); driver.AddFromName <ParticleSystem>(particleSystem.gameObject, "autoRandomSeed"); } } if (this.active) { driver.AddFromName(gameObject, "m_IsActive"); } if (this.updateITimeControl) { foreach (MonoBehaviour monoBehaviour in ControlPlayableAsset.GetControlableScripts(gameObject)) { IPropertyPreview propertyPreview = monoBehaviour as IPropertyPreview; if (propertyPreview != null) { propertyPreview.GatherProperties(director, driver); } else { driver.AddFromComponent(monoBehaviour.gameObject, monoBehaviour); } } } if (this.updateDirector) { foreach (PlayableDirector playableDirector in this.GetComponent <PlayableDirector>(gameObject)) { if (!(playableDirector == null)) { TimelineAsset timelineAsset = playableDirector.playableAsset as TimelineAsset; if (!(timelineAsset == null)) { timelineAsset.GatherProperties(playableDirector, driver); } } } } } ControlPlayableAsset.s_ProcessedDirectors.Remove(director); } } }
public override void GatherProperties(PlayableDirector director, IPropertyCollector driver) { var binding = director.GetGenericBinding(this) as Transform; if (binding == null) { return; } driver.AddFromComponent(binding.gameObject, binding); base.GatherProperties(director, driver); }
public override void GatherProperties(PlayableDirector director, IPropertyCollector driver) { var controller = director.GetGenericBinding(this) as EZAnimation; if (controller == null || controller.targetComponent == null) { return; } driver.AddFromComponent(controller.targetComponent.gameObject, controller.targetComponent); base.GatherProperties(director, driver); }
public override void GatherProperties(PlayableDirector director, IPropertyCollector driver) { #if UNITY_EDITOR var controller = director.GetGenericBinding(this) as EZTransformAnimation; if (controller == null || controller.targetTransform == null) { return; } driver.AddFromName <EZTransformAnimation>(controller.gameObject, "m_Time"); driver.AddFromComponent(controller.targetTransform.gameObject, controller.targetTransform); #endif base.GatherProperties(director, driver); }
internal static void PreviewTimeControl(IPropertyCollector driver, PlayableDirector director, IEnumerable <MonoBehaviour> scripts) { foreach (var script in scripts) { var propertyPreview = script as IPropertyPreview; if (propertyPreview != null) { propertyPreview.GatherProperties(director, driver); } else { driver.AddFromComponent(script.gameObject, script); } } }
public void GatherProperties(PlayableDirector director, IPropertyCollector driver) { GameObject gameObject = GetGameObjectBinding(director); if (!gameObject) { return; } if (this.updateParticle) { foreach (ParticleSystem particleSystem in this.GetParticleSystems(gameObject)) { driver.AddFromName <ParticleSystem>(particleSystem.gameObject, "randomSeed"); driver.AddFromName <ParticleSystem>(particleSystem.gameObject, "autoRandomSeed"); } } if (this.active) { driver.AddFromName(gameObject, "m_IsActive"); } if (this.updateITimeControl) { foreach (MonoBehaviour controlableScript in this.GetControlableScripts(gameObject)) { IPropertyPreview propertyPreview = controlableScript as IPropertyPreview; if (propertyPreview != null) { propertyPreview.GatherProperties(director, driver); } else { driver.AddFromComponent(controlableScript.gameObject, (Component)controlableScript); } } } }
/// <inheritdoc/> public void GatherProperties(PlayableDirector director, IPropertyCollector driver) { if (director == null) { return; } // prevent infinite recursion if (s_ProcessedDirectors.Contains(director)) { return; } s_ProcessedDirectors.Add(director); var gameObject = sourceGameObject.Resolve(director); if (gameObject != null) { if (updateParticle) { // case 1076850 -- drive all emitters, not just roots. foreach (var ps in gameObject.GetComponentsInChildren <ParticleSystem>(true)) { driver.AddFromName <ParticleSystem>(ps.gameObject, "randomSeed"); driver.AddFromName <ParticleSystem>(ps.gameObject, "autoRandomSeed"); } } if (active) { driver.AddFromName(gameObject, "m_IsActive"); } if (updateITimeControl) { foreach (var script in GetControlableScripts(gameObject)) { var propertyPreview = script as IPropertyPreview; if (propertyPreview != null) { propertyPreview.GatherProperties(director, driver); } else { driver.AddFromComponent(script.gameObject, script); } } } if (updateDirector) { foreach (var childDirector in GetComponent <PlayableDirector>(gameObject)) { if (childDirector == null) { continue; } var timeline = childDirector.playableAsset as TimelineAsset; if (timeline == null) { continue; } timeline.GatherProperties(childDirector, driver); } } } s_ProcessedDirectors.Remove(director); }