Hello
Quick question-
I use Invector-
The invector UI is always in front-
How do disable it during convsations?
Disable invector UI
Re: Disable invector UI
Invector has several UI canvases.
The easiest solution is to set the Dialogue Manager's Canvas > Sort Order to a higher value such as 2. This will put the UI on top of the Invector UIs, whose canvases use Sort Order 0.
If you don't want to do that, you can write a script that disables Invector's canvases during conversations. Something like:
The easiest solution is to set the Dialogue Manager's Canvas > Sort Order to a higher value such as 2. This will put the UI on top of the Invector UIs, whose canvases use Sort Order 0.
If you don't want to do that, you can write a script that disables Invector's canvases during conversations. Something like:
Code: Select all
public class DisableInvectorUIDuringConversations : MonoBehaviour // Add to Dialogue Manager.
{
void OnConversationStart(Transform actor)
{
SetInvectorCanvases(false);
}
void OnConversationEnd(Transform actor)
{
SetInvectorCanvases(true);
}
void SetInvectorCanvases(bool value)
{
if (vHUDController.instance != null) vHUDController.instance.GetComponentInParent<Canvas>().enabled = value;
if (vControllerAimCanvas.instance != null) vControllerAimCanvas.instance.canvas.enabled = value;
if (FindObjectOfType<vThrowManager>() != null) FindObjectOfType<vThrowManager>().GetComponentInChildren<Canvas>().enabled = value;
}
}
Re: Disable invector UI
Thank you Toni
First suggestion was easy and spot on
Embarrassed I missed that one.
Sorry…
First suggestion was easy and spot on
Embarrassed I missed that one.
Sorry…