Esempio n. 1
0
            private void GetShaderProperty(Shader shader, int index)
            {
                ShaderProperty property = new ShaderProperty();

                property.name        = ShaderUtil.GetPropertyName(shader, index);
                property.description = ShaderUtil.GetPropertyDescription(shader, index);
                property.type        = ShaderUtil.GetPropertyType(shader, index).ToString();
                propertyList.Add(property);
            }
Esempio n. 2
0
        public override void ShowChildDetail(ObjectDetail detail)
        {
            ShaderDetail shaderDetail = detail as ShaderDetail;

            if (!shaderDetail.showShaderProperty)
            {
                return;
            }
            for (int i = 0; i < shaderDetail.propertyList.Count; i++)
            {
                ShaderProperty property = shaderDetail.propertyList[i];
                if (property == null)
                {
                    continue;
                }
                GUILayout.BeginHorizontal();
                GUILayout.Space(720);
                GUILayout.Label(property.name, GUILayout.Width(100));
                GUILayout.Label(property.type, GUILayout.Width(100));
                GUILayout.Label(property.description, GUILayout.Width(100));
                GUILayout.EndHorizontal();
            }
        }