Author Topic: NGUI 3.0: Multiple UICameras  (Read 3776 times)

Yukichu

  • Full Member
  • ***
  • Thank You
  • -Given: 3
  • -Receive: 8
  • Posts: 101
    • View Profile
NGUI 3.0: Multiple UICameras
« on: September 26, 2013, 02:02:18 PM »
I have multiple UICameras due to using the KFGMapSystem (it has two UICameras, one for minimap, one for fullsize map)

I upgrade to NGUI 3.0.  Each individual UICamera is no longer configurable, as they all use a single configuration of the first-found-in-the-scene UICamera.

Issues are: 
If one camera has an audio listener, all cameras have audio listeners.
I cannot disable options for the MiniMap cameras and still have options available for main UI Camera.

So...  what are my options?  Creating a custom UICamera?  Could I just remove the following chunk of code from UICameraEditor.cs and everything work fine presumably?

  1.                 if (UICamera.eventHandler != cam)
  2.                 {
  3.                         serializedObject.Update();
  4.                         EditorGUILayout.PropertyField(serializedObject.FindProperty("eventReceiverMask"), new GUIContent("Event Mask"));
  5.                         EditorGUILayout.PropertyField(serializedObject.FindProperty("clipRaycasts"));
  6.                         serializedObject.ApplyModifiedProperties();
  7.  
  8.                         EditorGUILayout.HelpBox("All other settings are inherited from the First Camera.", MessageType.Info);
  9.  
  10.                         if (GUILayout.Button("Select the First Camera"))
  11.                         {
  12.                                 Selection.activeGameObject = UICamera.eventHandler.gameObject;
  13.                         }
  14.                 }
  15.  

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: NGUI 3.0: Multiple UICameras
« Reply #1 on: September 26, 2013, 03:30:50 PM »
UICamera hides settings that have no effect for it. Only the top-most UICamera's settings matter. Everyone else's don't.