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()));
        }
Exemplo n.º 2
0
        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);
        }
Exemplo n.º 3
0
        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);
        }
Exemplo n.º 4
0
 protected VFXAbstractRenderedOutput(VFXDataType dataType) : base(VFXContextType.Output, dataType, VFXDataType.None)
 {
 }
Exemplo n.º 5
0
        }                                               // Used by serialization

        public VFXContext(VFXContextType contextType, VFXDataType inputType, VFXDataType outputType)
        {
            m_ContextType = contextType;
            m_InputType   = inputType;
            m_OutputType  = outputType;
        }