You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: en/manual/graphics/materials/materials-for-developers.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,11 +17,13 @@ This diagram shows the Material interfaces and implementation classes:
17
17
18
18
The file @'Stride.Rendering.Materials.MaterialKeys' contains most material keys you might need to use, have a look through it to figure out which one you might need to get to modify the parameter you are interested in.
And you want to clone that material, but change its color to red at runtime.
24
25
Searching through the different keys contained in @'Stride.Rendering.Materials.MaterialKeys' you would find `MaterialKeys.DiffuseValue` and use it as the key to set the new color value you want:
// Replace this with whatever you would want this asset to hold at runtime
@@ -122,7 +127,7 @@ public sealed class YOUR_CLASS_COMPILER : AssetCompilerBase
122
127
```
123
128
124
129
> [!Warning]
125
-
> Every changes made to the runtime asset will break previously built asset databases, make sure to delete the build artifacts stride generates for assets (`YOUR_PROJECT.Windows/obj/stride` and `bin/db`) after changing the class to make sure the asset database is fully rebuilt on the next build.
130
+
> Every changes made to the runtime asset will break previously built asset databases, make sure to clean the solution or manually delete the build artifacts stride generates for assets (`YOUR_PROJECT.Windows/obj/stride` and `bin/db`) after changing the class to make sure the asset database is fully rebuilt on the next build.
126
131
127
132
This takes care of the support for this asset, you could create a `*.blks` file inside your `Assets` directory and fill in the content manually, but might as well do it through the editor ...
128
133
@@ -189,4 +194,4 @@ And you're finally done, have fun !
0 commit comments