Example #1
0
    protected override void InitializeInternal()
    {
        if (InputManager.Instance.CurrentInputMode == InputManager.InputMode.Unity)
        {
            if (steamPlayArea == null)
            {
                throw new InvalidOperationException("Please set the SteamVR_PlayArea in the throwing Scene Manager!");
            }

            bounds = steamPlayArea.GetRectangle();
            var tempBounds = new List <Vector3>();
            foreach (var point in bounds)
            {
                if (point != Vector3.zero)
                {
                    tempBounds.Add(point);
                }
            }
            bounds = tempBounds.ToArray();
        }

        if (bounds == null || bounds.Length < 4)
        {
            // Todo: somethign about this
            // Todo: give min size;
            throw new InvalidOperationException("Neew bounds to play the throwing game!!");
        }

        if (PCCamera == null)
        {
            PCCamera = PCCameraRig.GetComponentInChildren <Camera>();
        }

        UpdateBoundSide(boundsIndex);
    }