Closed gil-ferraz closed 7 years ago
Thanks Gil, good idea! Theres a function called RTEditorGUI.ColorToTex which creates a texture from a color already. Maybe use that, instead of creating a new namespace, even if it's an extension:) Although I like your implementation better... Second note, cache the GUIStyle and create the texture only when needed, in SetBackgroundTexture. Creating that multiple times a frame would leak alot of memory;)
So, fixed most of that myself. Are you ok with this?
Hi! :) I'm glad you liked my suggestion. I am working on a custom Dailogue System for a project. I realized that I had way to many different Node types available and things were getting pretty chaotic on the editor side, so that's when I came up with the coloring idea. Sorry for not responding or edition the code with your suggestions sooner, but I have been very busy lately :/ I'm glad you were able to make the necessary corrections. The final feature looks pretty cool and well implemented :)
No problem, and indeed, bigger canvases can get very messy:D I think this will help alot, thanks! If you've got any nice screens to share, don't hesitate to post them on the forums;)
Feature to change the background color of a Node via the SetBackgroundColor(Color color) method. This is useful to better differentiate between node types in complex systems.