[Solved] CinemachinePriority except

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Deses
Posts: 15
Joined: Fri May 28, 2021 9:27 am

[Solved] CinemachinePriority except

Post by Deses »

Hi!

I have a problem trying to understand how to use the "except:GameObject" vcam parameter.
CinemachinePriority()
Syntax: CinemachinePriority(vcam, [priority], [cut])

Parameters:

vcam: The name of a GameObject containing a CinemachineVirtualCamera. Alternatives for this parameter:
all: Set the priority of all vcams.
except:GameObject: Set the priority of all vcams except the one named GameObject.
priority: (Optional) New priority level. Default: 999.
cut: (Optional) Cuts immediately to the new vcam instead of easing to it.
According to the docs, if I use "except:vcamName" as the first parameter, it should set the priority for all other cameras other than vcamName.

I'm using it as shown:

Code: Select all

CinemachinePriority(except:vcamName, 0);
And I'm getting this error:

Code: Select all

Dialogue System: Sequencer: CinemachinePriority(except:vcamName,0): Can't find virtual camera 'except:vcamName.
UnityEngine.Debug:LogWarning (object)
Debugging the class "CinemachineVirtualCamera" I see at line 24 that

Code: Select all

var vcam = (subject != null) ? subject.GetComponent<CinemachineVirtualCamera>() : null;
subject is null.

Removing "except:" changes the priority for the specified camera.
Deses
Posts: 15
Joined: Fri May 28, 2021 9:27 am

Re: [Solved] CinemachinePriority except

Post by Deses »

So, the issue was that the branch I'm in had an outdated of Dialogue System. :facepalm:

I'm going to blame our devops for not merging the updated DS into main yet. :D
User avatar
Tony Li
Posts: 21925
Joined: Thu Jul 18, 2013 1:27 pm

Re: [Solved] CinemachinePriority except

Post by Tony Li »

Ah, I was just about to suggest that. Glad you got it all sorted out.
Post Reply