Scene fragments have a method called SetConditional which lets you add a callback that is evaluated whenever the fragment is refreshed. If the callback returns false the fragment is hidden. If it returns true whether it's shown is based on if it's part of a scene that is showing. So you could write a function that returns if the player is in a guild and pass that to SetConditional on the fragment. Then you just call Refresh on the fragment whenever it would change (when the player joins or leaves a guild).
|