Hi,
Inside some NPCs, I have attached a Dialogue Actor Script -> Bark UI settings -> Bark UI -> Bubble Template Standard Bark UI prefab. Is there a way I could modify for each of them the Canvas-> Order in Layer number?
Thanks!
[Solved] Bark UI -> Set Order in Layer for each NPC.
[Solved] Bark UI -> Set Order in Layer for each NPC.
Last edited by Japtor on Mon Oct 29, 2018 11:10 am, edited 1 time in total.
Re: Bark UI -> Set Order in Layer for each NPC.
Hi,
There are two ways:
1. You can add an instance of the bark UI to each NPC, and assign the instance to the Dialogue Actor. The NPC's Dialogue Actor will use this instance instead of creating its own instance of the prefab. Set each instance's Canvas -> Order in Layer.
2. Or add a script to the NPC. In Start(), wait one frame for the Dialogue Actor to instantiate the prefab, and then set the DialogueActor's barkUISettings.barkUI's Order In Layer:
There are two ways:
1. You can add an instance of the bark UI to each NPC, and assign the instance to the Dialogue Actor. The NPC's Dialogue Actor will use this instance instead of creating its own instance of the prefab. Set each instance's Canvas -> Order in Layer.
2. Or add a script to the NPC. In Start(), wait one frame for the Dialogue Actor to instantiate the prefab, and then set the DialogueActor's barkUISettings.barkUI's Order In Layer:
Code: Select all
IEnumerator Start() {
yield return null;
var barkCanvas = GetComponent<DialogueActor>().barkUISettings.barkUI.GetComponentInChildren<Canvas>();
barkCanvas.sortingOrder = ###; // Some value.
}
Re: Bark UI -> Set Order in Layer for each NPC.
Hi,
Thank you! It worked!
Have a nice day!
Thank you! It worked!
Have a nice day!
Re: [Solved] Bark UI -> Set Order in Layer for each NPC.
Glad to help!