Conversation
|
Not sure of the use case of this one, could you provide an example? |
In my own project, I created a wrapper tool script that further customises the SpriteMesh on top of what customization the SpriteMesh is able to provide. SpriteMeshInstance.Connect(StringName("on_generated_sprite_mesh"), Callable.From(CustomizeMaterial));public void CustomizeMaterial() {
StandardMaterial3D StandardMaterial = (StandardMaterial3D)SpriteMeshInstance.GetSurfaceOverrideMaterial(0);
StandardMaterial.DiffuseMode = BaseMaterial3D.DiffuseModeEnum.Toon;
StandardMaterial.SpecularMode = BaseMaterial3D.SpecularModeEnum.Toon;
StandardMaterial.RimEnabled = true;
StandardMaterial.Rim = 1.0f;
}Since the SpriteMesh is generated after a delay, it's not simple to do this without a signal. |
|
I think this should be at inside |
You are right, unfortunately C# classes can't extend GDScript classes. |
|
I meant that the emitted signal should be inside |
19a8f20 to
ede6b57
Compare
|
Sorry, GitHub made a mess out of this. |
This is useful if you want to connect your own tool script to modify the material after it's generated.