public override void GetPreviewProperties(List <PreviewProperty> properties, string name)
        {
            var pp = new PreviewProperty(PropertyType.Texture2DArray)
            {
                name         = name,
                textureValue = textureArray,
            };

            properties.Add(pp);
        }
Esempio n. 2
0
        public override void GetPreviewProperties(List <PreviewProperty> properties, string name)
        {
            var pp = new PreviewProperty(PropertyType.Matrix3)
            {
                name        = name,
                matrixValue = value
            };

            properties.Add(pp);
        }
Esempio n. 3
0
        public override void GetPreviewProperties(List <PreviewProperty> properties, string name)
        {
            var pp = new PreviewProperty(PropertyType.Cubemap)
            {
                name         = name,
                cubemapValue = cubemap
            };

            properties.Add(pp);
        }
        public override void GetPreviewProperties(List <PreviewProperty> properties, string name)
        {
            var pp = new PreviewProperty(PropertyType.Vector1)
            {
                name       = name,
                floatValue = value,
            };

            properties.Add(pp);
        }
        public override void GetPreviewProperties(List <PreviewProperty> properties, string name)
        {
            var pp = new PreviewProperty(PropertyType.Vector2)
            {
                name         = name,
                vector4Value = new Vector4(value.x, value.y, 0, 0),
            };

            properties.Add(pp);
        }
        public override void GetPreviewProperties(List <PreviewProperty> properties, string name)
        {
            var pp = new PreviewProperty(PropertyType.Texture2D)
            {
                name                 = name,
                textureValue         = texture,
                texture2DDefaultType = defaultType
            };

            properties.Add(pp);
        }
        public override void GetPreviewProperties(List <PreviewProperty> properties, string name)
        {
            var propType = ConvertConcreteSlotValueTypeToPropertyType(concreteValueType);
            var pp       = new PreviewProperty(propType)
            {
                name = name
            };

            if (propType == PropertyType.Vector1)
            {
                pp.floatValue = value.x;
            }
            else
            {
                pp.vector4Value = new Vector4(value.x, value.y, value.z, value.w);
            }
            properties.Add(pp);
        }
Esempio n. 8
0
        public override PreviewProperty GetPreviewProperty(string name)
        {
            var propType = ConvertConcreteSlotValueTypeToPropertyType(concreteValueType);
            var pp       = new PreviewProperty(propType)
            {
                name = name
            };

            if (propType == PropertyType.Vector1)
            {
                pp.floatValue = value.x;
            }
            else
            {
                pp.vector4Value = new Vector4(value.x, value.y, value.z, value.w);
            }
            return(pp);
        }
        public override void GetPreviewProperties(List <PreviewProperty> properties, string name)
        {
            var propType = concreteValueType.ToPropertyType();
            var pp       = new PreviewProperty(propType)
            {
                name = name
            };

            if (propType == PropertyType.Vector1)
            {
                pp.floatValue = value.m00;
            }
            else
            {
                pp.vector4Value = new Vector4(value.m00, value.m01, value.m02, value.m03);
            }
            properties.Add(pp);
        }
Esempio n. 10
0
 public static void SetPreviewProperty(this Material mat, PreviewProperty previewProperty)
 {
     previewProperty.SetMaterialPropertyBlockValue(mat);
 }