Page 2 of 2

Re: Questions about simultaneous panel movement of actors.

Posted: Thu Jun 10, 2021 5:36 pm
by losemarins
Hi

okay. I'll look forward to it.

Re: Questions about simultaneous panel movement of actors.

Posted: Fri Jun 11, 2021 8:51 pm
by losemarins
Hi Tony, the day you promised has passed. I'm still waiting for you.

Re: Questions about simultaneous panel movement of actors.

Posted: Fri Jun 11, 2021 9:35 pm
by Tony Li
Hi,

We're in different time zones, and I'm typing the reply right now. I took a little longer because I wanted to record a video of what the scene looks like:



I set up the animations to set the SpineGraphics' SkeletonGraphic.color.rgb values.

Here is the example scene:

DS_SpineExampleShowingPortraits_2021-06-11.unitypackage

I also updated the Spine integration to improve the way it triggers the "Show" animation:

DS_SpineSupport_2021-06-11.unitypackage

I tested clicking through the conversation very fast, and it appears to work fine.

Re: Questions about simultaneous panel movement of actors.

Posted: Sat Jun 12, 2021 11:21 am
by losemarins
Tony, thank you for your reply.
I'm sorry I didn't think of our time difference.
I've applied everything you gave me, but there's still a problem.
The problem arises when a [panel=x] is used on nodes just before moving panels of two or more actors simultaneously.
I'll tell you how to recreate it from the example you gave me.

1. Add a new panel and register it as the 4th panel.(panel index = 3)
2. Change the contents of the node(Dialogue Text:NPC 1 speaking) to "[panel=3]NPC 1 speaking"
3. During the course of the conversation, NPC1 is forever lost and invisible.

And another problem is that, as you can see in the video, when the actors change places, they don't look natural and blinks their own colors. Because of this, my game may be considered a low-grade game.

Re: Questions about simultaneous panel movement of actors.

Posted: Sat Jun 12, 2021 12:00 pm
by Tony Li
Hi,

I'll address both of those and send you an updated scene.

Re: Questions about simultaneous panel movement of actors.

Posted: Sat Jun 12, 2021 9:46 pm
by Tony Li
Hi,

I wrote a sequencer command to make it simpler for you to set up. I was going to include it in the example scene, but I like the way it works so I added it to the Spine integration:

DS_SpineSupport_2021-06-12.unitypackage

Here is the example scene:

DS_SpineExampleShowingPortraits_2021-06-12.unitypackage

The scene is named 'Spine Example Portraits Simpler'.

It uses a new sequencer command called SpineActor():


SpineActor(actorName, panel# | hide)

Shows a Spine actor portrait in a specific panel, or hide the portrait.

For example, the first node of the conversation is:

spineSimpler.png
spineSimpler.png (54.38 KiB) Viewed 575 times

You can see that this makes the conversation shorter, too. (Fewer nodes.) I hope this will make it easier for you to write conversations.

To use it, add a 'Spine Portrait Manager' component to the Dialogue Manager.

You do NOT need to use SpineDialogueUI or SpineSubtitlePanel. You can use a regular StandardDialogueUI.

You also do not need to set SetPortrait() or [panel=#]. You have complete manual control using SpineActor(). You can also show/hide as many actors as you want in the same node. You don't have to use multiple nodes like the previous example.

Using SpineActor(), the characters' SpineGraphics stay in their original canvases. They do not move into the dialogue UI. You can adjust the layering by setting the canvases' Sort Orders. I set the SpineGraphics canvases to Sort Order 0 and the Dialogue Manager's canvas to Sort Order 1 so it will show on top of the SpineGraphics.

If you have any questions about setting it up, please let me know.

Re: Questions about simultaneous panel movement of actors.

Posted: Mon Jun 14, 2021 8:44 am
by losemarins
Thank you, Tony.
I haven't tested everything but it seems to work well except for a few problems.
I modified some of the code (SpinePortraitManager.cs).
The reason for the modification is that if the actor moves to another panel and moves back to the previous panel, it will not work normally.

This is the code part I modified.

private void MoveSpineActorToPanel(SpineDialogueActor spineDialogueActor, int panelIndex)
{
if (spineDialogueActor == null) return;
if (spineDialogueActor.spineGameObject == null) return;
var rt = spineDialogueActor.spineGameObject.GetComponent<RectTransform>();
if (rt == null) return;
var panel = GetPanel(panelIndex);
if (panel == null) return;
if (panel.panelState == UIPanel.PanelState.Closed) panel.Open();
var panelRT = panel.GetComponent<RectTransform>();
rt.pivot = panelRT.pivot;
rt.anchoredPosition = panelRT.anchoredPosition;
rt.anchorMax = panelRT.anchorMax;
rt.anchorMin = panelRT.anchorMin;
rt.sizeDelta = panelRT.sizeDelta;
actors[spineDialogueActor] = panelIndex;
}

If there is any other problem, I will ask you again here. Have a nice day.

Re: Questions about simultaneous panel movement of actors.

Posted: Mon Jun 14, 2021 10:24 am
by Tony Li
Hi,

Thank you. Yes, that was a bug. I've updated the package for DS version 2.2.18.