private void UpdateType() { VFXDataType type = controller.direction == Direction.Input ? controller.context.model.inputType : controller.context.model.outputType; foreach (VFXDataType value in System.Enum.GetValues(typeof(VFXDataType))) { if (value != type) { RemoveFromClassList("type" + VFXContextUI.ContextEnumToClassName(value.ToString())); } } AddToClassList("type" + VFXContextUI.ContextEnumToClassName(type.ToString())); }
Texture2D GetIconForVFXType(VFXDataType type) { switch (type) { case VFXDataType.SpawnEvent: return(VFXView.LoadImage("Execution")); case VFXDataType.Particle: case VFXDataType.ParticleStrip: // TODO Add an icon return(VFXView.LoadImage("Particles")); } return(null); }
public static VFXData CreateDataType(VFXGraph graph, VFXDataType type) { VFXData newVFXData; switch (type) { case VFXDataType.kParticle: newVFXData = ScriptableObject.CreateInstance <VFXDataParticle>(); break; case VFXDataType.kMesh: newVFXData = ScriptableObject.CreateInstance <VFXDataMesh>(); break; default: return(null); } newVFXData.m_Parent = graph; return(newVFXData); }
protected VFXAbstractRenderedOutput(VFXDataType dataType) : base(VFXContextType.Output, dataType, VFXDataType.None) { }
} // Used by serialization public VFXContext(VFXContextType contextType, VFXDataType inputType, VFXDataType outputType) { m_ContextType = contextType; m_InputType = inputType; m_OutputType = outputType; }