Giter Club home page Giter Club logo

spc's Introduction


Interface


Shader From

The source shader that want to change from.

Shader To

The destination shader that want to change to.

Properties List

  • The list on the left shows all the properties in the source shader.
  • The list in the middle shows all the properties want to convert to, None means the property will not be converted.
  • The list on the right shows the type of the property.

⚠️ If the property type is None, the property will not be converted even if the destination is not None.

"Upgrade Project Folder" Button

Click this button to change the shader and convert properties. This option will scan the whole project folder.

"Upgrade Selection" Button

Click this button to change the shader and convert properties. If there are materials selected, only the chosen materials will be changed. Otherwise nothing will be changed.


Code API


Enum PropertyType

Namescpace: EditorTools.ShaderPropertiesConverter

Syntax

public enum PropertyType

A enum that contain the type of the property.

Fields:

Name Description Value
None
Texture
Float
Vector
Color

Class PropertyData

Namescpace: EditorTools.ShaderPropertiesConverter

Syntax

public class PropertyData

This class is used to store the data of shader properties.

Property:

Name Declaration Description Type
source public string source{ get; set; } represents the name of source shader property string
dest public string dest { get; set ; } = "None"; represents the name of destination shader property string
type public PropertyType type{ get; set; } represents the type of shader property PropertyType

Class ShaderPropertiesConverter

Namescpace: EditorTools.ShaderPropertiesConverter

Syntax

public class ShaderPropertiesConverter

This class is used to convert shader properties from one shader to another.

Methods

UpgradeProjectFolder(List<PropertyData>, string, string)

Upgrade all materials in the project folder.

Declaration

UpgradeProjectFolder(List<PropertyData> properties, string oldShader, string newShader)

Parameters

Name Description Type
properties List of properties to be converted List<PropertyData>
oldShader Old shader name string
newShader New shader name string

 

UpgradeSelection(UnityEngine.Object[], List<PropertyData>, string, string)

Upgrade all materials in the selection

Declaration

UpgradeSelection(UnityEngine.Object[] selection, List<PropertyData> properties, string oldShader, string newShader)

Parameters

Name Description Type
selection List of objects to be converted UnityEngine.Object[]
properties List of properties to be converted List<PropertyData>
oldShader Old shader name string
newShader New shader name string

spc's People

Contributors

misakieku avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.