コード例 #1
0
        #pragma warning restore 649

        /// <summary>
        /// Starts up MLRaycast
        /// </summary>
        public static MLResult Start()
        {
            #if PLATFORM_LUMIN
            _result = MLRaycast.Start();
            if (!_result.IsOk)
            {
                Debug.LogErrorFormat("Error: MLRaycastStarterKit failed starting MLRaycast. Reason: {0}", _result);
            }
            #endif

            return(_result);
        }
コード例 #2
0
        private void commonStart()
        {
            MLInput.OnTriggerDown += MLInput_OnTriggerDown;
            MLInput.OnTriggerUp += MLInput_OnTriggerUp;

            if (!MLRaycast.IsStarted)
            {
                MLResult raycastStart = MLRaycast.Start();
                switch (raycastStart.Result)
                {
                    case MLResult.Code.Ok:
                        startRayCasting();
                        break;
                    case MLResult.Code.UnspecifiedFailure:
                        throw new System.NotImplementedException();
                    default:
                        break;
                }
            }
            else
            {
                startRayCasting();
            }
        }
コード例 #3
0
    public GameObject prefab;    // Cube prefab

    // Use this for initialization
    void Start()
    {
        ctransform = transform; // Camera's transform

        MLRaycast.Start();
    }