Brush components

Krileon
Member
Registered: 2014-06-01
Posts: 41

Topic

I'd be great if we could add components to a brush on paint instead of just materials. This would allow for generic brushes that can have different scripted behavior. I have a lava brush and a water brush. Both are the same mesh, but different material. However, they both need different scripts. 1 slows my characters (water) and the other kills them (lava). So I end up having to duplicate all my prefabs then create a new alias block. That's a lot of duplicate work that could be avoided if components could be assigned on creation like materials.

What do you think?

Lea Hayes
Rotorz Limited
From: United Kingdom
Registered: 2014-03-04
Posts: 638

Response 1

Krileon wrote:

What do you think?

I think that this sounds very interesting. There are a few ways in which something like this could be incorporated ranging from a simple prefab attachment (like the tileset brushes have) to attachable components. It would be fantastic if Unity supported components on ScriptableObjects (similar to GameObjects).

One thing which you could do (for the time being) is to create a little runtime/editor script which hooks into the Brush.TilePainted event so that you can add these components.

Thank you for suggesting this; I will certainly need to give this idea some more thought!!