Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: Yukichu on September 26, 2013, 02:02:18 PM

Title: NGUI 3.0: Multiple UICameras
Post by: Yukichu 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.  
Title: Re: NGUI 3.0: Multiple UICameras
Post by: ArenMook 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.