I ran into a situation where I needed to change the wrap mode of a playing cutscene. Cutscene.playingWrapMode has a private setter, so I made it public. Are there any downsides to doing this?
No, there are no downsides at doing this, but I would suggest to instead either:
1) Set the Cutscene.defaultWrapMode property, or
2) Pass a WrapMode to the Play() method when playing a cutscene. There are several overloads of the Play() method, one of which takes a WrapMode parameter to tell what WrapMode to use for the cutscene in that play-through.
Once again though, if making Cutscene.playingWrapMode public works for you better though, that is totally fine 🙂
The reason I’m doing it this way is because the cutscene is already running (and looping). At a certain point in the game I want the cutscene to finish its current loop and stop. I can’t do that with the Play() method, as if the cutscene is already playing, the method returns early, before changing the wrap mode. Likewise, DefaultWrapMode won’t work since the cutscene is playing already.
Thanks!
Ben
Author
Posts
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic.
Login
Register
By registering on this website you agree to our Privacy Policy.