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

All Properties that are visible in Inspector should be accessible from script #1011

Open
klauskobald opened this issue Apr 26, 2022 · 1 comment

Comments

@klauskobald
Copy link

For example the SphereWaterInteraction has the private _maxSpeed property. I need to change that depending on the boat speed.
I do it now by hacking into it with reflections.
I see no reason, why a lot of properties are private.

@huwb
Copy link
Contributor

huwb commented May 2, 2022

Hi there, generally the reason is the standard thing of making modular code with minimised surface area/connections to other code. The more code we can keep private the more easily we can change it later.

But I agree the example you gave can be made public without making a significant issue. I can make nearby similar properties public too if they also look fine.

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

No branches or pull requests

3 participants