Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Thunderkit Utilities #558

Merged
merged 23 commits into from
Sep 18, 2024
Merged

Thunderkit Utilities #558

merged 23 commits into from
Sep 18, 2024

Conversation

Indigocoder1
Copy link
Contributor

Changes made in this pull request

  • Added various scripts for use with Thunderkit:
  • Added a script for applying the SN font to GameObjects in TK
  • Added a script for applying a layer from SN to a GameObject in TK
  • Added a script for applying the SN shaders to a GameObject in TK
  • Added a script for applying various materials to a GameObject in TK

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

  • None

@EldritchCarMaker
Copy link
Contributor

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

@EldritchCarMaker
Copy link
Contributor

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?

@Indigocoder1
Copy link
Contributor Author

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

@Indigocoder1
Copy link
Contributor Author

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)

Copy link
Member

@Metious Metious left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left a few comments. The code as a whole LGTM and useful. Nicely done

Nautilus/Utility/ThunderkitUtilities/ApplicationModes.cs Outdated Show resolved Hide resolved
Nautilus/Utility/ThunderkitUtilities/ApplySNLayer.cs Outdated Show resolved Hide resolved
Nautilus/Utility/ThunderkitUtilities/ApplySNMaterial.cs Outdated Show resolved Hide resolved
Nautilus/Utility/ThunderkitUtilities/ApplicationModes.cs Outdated Show resolved Hide resolved
@Metious Metious assigned Indigocoder1 and unassigned Metious Sep 14, 2024
@Metious
Copy link
Member

Metious commented Sep 14, 2024

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.

Copy link
Contributor

@EldritchCarMaker EldritchCarMaker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I forgot to add my review earlier :(

Metious has already pointed out my one comment by now, but otherwise looks good to me

Nautilus/Utility/ThunderkitUtilities/ApplySNMaterial.cs Outdated Show resolved Hide resolved
@Metious Metious merged commit 288e473 into SubnauticaModding:master Sep 18, 2024
1 check passed
@github-actions github-actions bot locked and limited conversation to collaborators Sep 18, 2024
@Metious Metious linked an issue Sep 18, 2024 that may be closed by this pull request
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Utilities for Thunderkit Mods
4 participants