示例#1
0
 /// <summary>
 /// Checks the component's setup and initializes it
 /// </summary>
 private void Awake()
 {
     appBarPlacer = GetComponent <AppBarPlacer>();
     if (appBarPlacer == null)
     {
         SpecialDebugMessages.LogComponentNotFoundError(this, nameof(AppBarPlacer), gameObject);
     }
 }
示例#2
0
        protected override void Setup()
        {
            base.Setup();
            AppBarPlacer placer = instance.GetComponent <AppBarPlacer>();

            if (placer == null)
            {
                SpecialDebugMessages.LogComponentNotFoundError(this, nameof(AppBarPlacer), instance);
            }
            placer.TargetBoundingBox = targetBoundsControl;
            AppBarActions actions = instance.GetComponent <AppBarActions>();

            if (actions == null)
            {
                SpecialDebugMessages.LogComponentNotFoundError(this, nameof(AppBarActions), instance);
            }
            PhotonView photonView = targetBoundsControl.Target.GetComponent <PhotonView>();

            actions.TargetNetworked = (photonView != null);
        }