-
-
Notifications
You must be signed in to change notification settings - Fork 479
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
Water body auto clip-include #912
Conversation
Nice! An option to disable auto clipping will be useful. Currently if I want to create a sphere, I will have to clip it with a box and then unclip it again with a sphere. |
You mean you are setting to clip everything by default, then adding a box to include, then a sphere to cut out again? |
Image below will help. I want to clip by default, and then use a sphere to include water. And use the water body too. I would have to undo the clipping the water body adds to accomplish this. |
Yeah fair point added now Also merged master so that diff is not horrendous |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Just a couple of things.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I missed this but the execution order will need to be after the ocean for it to work in builds. And release notes if you want. Can merge after that is done.
88eb113
to
c2dfdf7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did the last review items. Ready to merge when you're ready.
@huwb happy to resolve release note conflict and merge if you're fine with everything. |
thanks for bumping what is the requirement for the update order? i'm not super against it but just curious if we can avoid it. the update order adds implicit dependencies between parts of the code which are not documented and can break, so previously i did a push to minimise the use of update orders. perhaps an alternative is to call our own update function on all waterbodies from the OceanRenderer component. however im aware this is editor code and maybe not worth it. but it might be good to record what the update order dependence is in a comment. |
The Update method is stripped from builds. So this feature will only get triggered from OnEnable in builds which is execution order dependent on OR.
Done.
Agreed. Going to look at doing that next. I am considering using C# delegates or would you prefer we maintain our own registry and call directly? |
Ohh it's OnEnable. I guess this is part of the same update issue we're discussing oh the other pr that ensures events get called at the right times when OR enabled/disabled. Do you know which PR I mean? I'll see if I can find it after posting this. |
If clipping is enabled and clipping set to remove everything by default, then the waterbody ensures its area is clip-included. This seems good to me, but needs the ocean lifetime stuff to ensure OnEnable is called after the OceanRenderer
fd1c7f8
to
701656c
Compare
Make waterbody automatically clip-include
If clipping is enabled and clipping set to remove everything by default, then the waterbody ensures its area is clip-included.
This seems good to me, but needs the ocean lifetime stuff to ensure OnEnable is called after the OceanRenderer.
No urgency on this so ill just park it here.
NOTE: Just realised i created it against master instead of local-water-body. I'm guessing the life cycle stuff won't merge soon so this is probably fine, but review-by-commit is necessary, just the last one is relevant.