Hello,
Since I have implemented in the game a very unique render feature, but I wish to give the player the option to change the color palette - I'm wondering if there a way to do that through menu or actionlist.
In details:
I have 2 different color palette profiles: with 16 colors and another with 32, these profiles are loaded into the Render Features panel of my Render 2D setting. (URP)
Not necessarily from the menu, since my programming power is below zero, it would also be fine just to have an item in the inventory to click to trigger this change, just a crude switch but in realtime.
Thanks in advance for any hint or help about this.
Best
Flavio
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
Writing to the properties of a Render Feature can be tricky and does require scripting - a thread on this topic can be found here.
The exact code would depend on your feature, and the properties you wish to change, but that's outside AC. If you have the code to handle this prepared, I can advise on how to plug it into AC so that it can be run from an ActionList.
Ok, that would be great!
I made up 2 scripts
A. That allows me to swap the color profiles in realtime pressing the the "E" key.
B. That trigger the swap of the color profile calling the SwapProfile() method.
I think the "B" is the more suitable for the purpose (just guessing), if you can drive me on how to implement it into the AC would be amazing.
Thank you!
Pressing E was just a test; the SwapProfile method is more in line with what I need, as it allows me to swap the profile through the action list when changing the scene (which is the most likely use case).
Make your method public, attach it to an empty GameObject in the scene, and then make that object a prefab, and remove from the scene.
You can then use AC's Object: Call event Action to reference that method via the prefab.
It is working! Thanks a lot!!!