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

Added null checking code for missing process runtime #286

Merged
merged 3 commits into from
Feb 10, 2025

Conversation

poetter-sebastian
Copy link
Contributor

I added some null checking codes to just warn the user if the process is not existing in the scene and just warns the user.

@coderabbitai review
/analyze

@poetter-sebastian poetter-sebastian changed the title Added null checking code for missing runtime Added null checking code for missing process runtime Jan 30, 2025
@poetter-sebastian poetter-sebastian added bug Something isn't working and removed bug Something isn't working labels Jan 30, 2025
@poetter-sebastian poetter-sebastian self-assigned this Jan 30, 2025
…ssSceneObjects' (runtime and editor time)

Added missing description of the FillGroupListItem function
}
else
{
UnityEngine.Debug.LogError("Process runtime configurator is not set in the scene and the object will not be registered. Create an empty game object with the 'RuntimeConfigurator' script attached to it.");
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this error is redundant, as you're already receiving the "not registered" warning. The point of this if statement would be not to be flooded with "missing runtime configurator" exceptions when dragging a PSO in the scene - it's good that other code might throw that exception when trying to access the Runtime Configurator, but if we decide that PSO's just throw a warning and don't register we don't need this.

}
else if (!loggedWarning)
{
Debug.LogWarning("Process runtime configurator is not set in the scene, the object will not be registered.");
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe you should set loggedWarning = true also in the Init function, line 299. That way you don't get a double warning e.g. when dragging an object in the scene. The two warnings could also be identical (I like that the other one communicates the name of the GO).

Added better handling of warning logs in the process scene object (PSO)
@poetter-sebastian poetter-sebastian merged commit fda319a into develop Feb 10, 2025
2 checks passed
@poetter-sebastian poetter-sebastian deleted the feature/mp-3146-copy-prefab-with-group branch February 10, 2025 16:40
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

Successfully merging this pull request may close these issues.

2 participants