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

Fix log spam caused by invalid scripts in build #78

Open
Happyrobot33 opened this issue Oct 13, 2023 · 0 comments
Open

Fix log spam caused by invalid scripts in build #78

Happyrobot33 opened this issue Oct 13, 2023 · 0 comments

Comments

@Happyrobot33
Copy link

The issue itself

This is an issue with the UI Styler system, that I am also encountering with this asset I maintain that uses a forked version of said UI styler setup. The issue seems to stem from the fact that even though all of the UI Styler scripts ARE excluded from the built version of the world, something about Unity itself still thinks there should be script components there and will spam the log with a bunch of WARNING: The referenced script on this Behaviour {Game Object Name} is missing!. This doesn't actually cause any crashing but makes reading world logs a massive pain as it just turns into a massive wall of text
image

Things ive tried

All of these approaches tackle deleting the components from the gameobjects themselves

[OnPostProcessScene]

Removes them in the unity scene upon play mode, but doesnt seem to fix the error in game. I know this works for builds because I have other scripts that run during OnPostProcessScene that edit U# script values and those work fine

Using the SDK callbacks

This technically could work but realistically isnt a option since when these are called, Unity hasnt saved a copy of the scene yet so the edits are applied to the active scene, breaking the UI Styler permanently since the components are deleted

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant