Closed Indigocoder1 closed 1 month ago
I also question the necessity of the layer assigning at all, to be honest. Do layers assigned to prefabs in unity not work when imported into the game? I feel like that would be the better option to use, rather than relying on a component to set the layer at runtime
We've been wanting to set up a "clone" of the subnautica marmosetuber shader for use in unity to allow shader property customization within the editor for a while now. If we were to get that set up and potentially commonplace, wouldn't the shader setting component overwrite any values already on the shader? Is that something worth worrying about? If so, would that be better fixed in the AddSNShaders utility method itself, rather than this wrapper component for it?
I also question the necessity of the layer assigning at all, to be honest. Do layers assigned to prefabs in unity not work when imported into the game? I feel like that would be the better option to use, rather than relying on a component to set the layer at runtime
They would have to have the same index in Unity as in the game. Technically you could set that up but it seems more convenient to just have them all in a list/enum to apply. Tbh the only use I've found for it so far is for custom damage decals (which need the Usable layer), but I just added them all anyway
We've been wanting to set up a "clone" of the subnautica marmosetuber shader for use in unity to allow shader property customization within the editor for a while now. If we were to get that set up and potentially commonplace, wouldn't the shader setting component overwrite any values already on the shader? Is that something worth worrying about? If so, would that be better fixed in the AddSNShaders utility method itself, rather than this wrapper component for it?
Probably? Tbh I'm not too familar with the ApplySNShaders method itself but I would say it should be fixed in there, not the wrapper (Assuming this is a problem)
We've been wanting to set up a "clone" of the subnautica marmosetuber shader for use in unity to allow shader property customization within the editor for a while now. If we were to get that set up and potentially commonplace, wouldn't the shader setting component overwrite any values already on the shader? Is that something worth worrying about? If so, would that be better fixed in the AddSNShaders utility method itself, rather than this wrapper component for it?
The wrapper doesn't need to know how to handle them, it would just "redirect" a game object to what knows how to handle them.
Changes made in this pull request
Note: Could someone look at these 2 preprocessors? I don't particularly like using them like that and I'm wondering if there's a better way to do that. Different Layers in SN & BZ Different materials in SN & BZ
My old Asset Bundle tutorial stuff is in here but that was merged a while ago so idk why that shows up still.
Breaking changes