Exemplo n.º 1
0
    // Use this for initialization
    void Start()
    {
        if (Application.isEditor)
        {
            conf = "C:/Users/VR_Demo/Desktop/VR_DevelopmentIDE/VR_DevelopmentIDE/VR_DL/Package/config.ini";
        }
        else
        {
            conf = Application.dataPath + "/config.ini";
        }
        SetConfValues();

        /*string localIP;
         * using (Socket socket = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, 0))
         * {
         *  socket.Connect("8.8.8.8", 50051);
         *  IPEndPoint endPoint = socket.LocalEndPoint as IPEndPoint;
         *  localIP = endPoint.Address.ToString();
         * }*/

        //string localIP = "172.18.227.36";

        string localIP = "198.215.56.140"; //"localhost";

        channel = new Channel(localIP + ":50051", ChannelCredentials.Insecure);

        Debug.Log("Created channel.");
        client = new Evaluator.Evaluator.EvaluatorClient(channel);
        Debug.Log("Created client.");

        manager      = FindObjectOfType <CLayerManager>();
        modelHandler = FindObjectOfType <CModelHandler>();
    }
Exemplo n.º 2
0
    private string dir_inputimages; // Where image classes stored.

    private void Awake()
    {
        LayerManager = FindObjectOfType <CLayerManager>();
        m_Path       = Application.dataPath + directory;
        Debug.Log("mPath" + m_Path);

        activations = FindObjectOfType <CAllLayerManager>();
    }
Exemplo n.º 3
0
    public int ContainerID = -1; // Set uninitialized ID for this container. ID should be set in Editor (start at 0).

    /* Initialization on game start. */
    void Awake()
    {
        // Register components:
        Collider = this.GetComponent <BoxCollider>();

        // Find layer manager:
        manager = FindObjectOfType <CLayerManager>();
    }
Exemplo n.º 4
0
    private void Awake()
    {
        Center  = transform.position;
        Nodes   = new List <CListable>();
        FarLeft = Center;

        layerManager = FindObjectOfType <CLayerManager>();
        sizeSphere   = FindObjectOfType <CSizeSphere>();
    }
Exemplo n.º 5
0
    private void Awake()
    {
        InitialSize = gameObject.transform.localScale;
        VSize       = InitialSize;
        manager     = FindObjectOfType <CLayerManager>();

        if (textObj)
        {
            text = textObj.GetComponent <TextMesh>();
        }
    }
Exemplo n.º 6
0
    void Awake()
    {
        layerMask = LayerMask.GetMask("Pointable");
        CameraRig = FindObjectOfType <OVRCameraRig>();
        Transform Parent = CameraRig.transform.Find("TrackingSpace");

        RightHand    = Parent.Find("RightHandAnchor");
        LeftHand     = Parent.Find("LeftHandAnchor");
        lineRenderer = GetComponent <LineRenderer>();

        layerManager = FindObjectOfType <CLayerManager>();
    }
Exemplo n.º 7
0
    private void Awake()
    {
        // Grabbable Component:
        rigidbody = GetComponent <Rigidbody>();
        grabbable = GetComponent <OVRGrabbable>();

        // Handle Textures:
        renderer = GetComponent <Renderer>();

        manager = FindObjectOfType <CLayerManager>();

        activations = FindObjectOfType <CAllLayerManager>();
    }
Exemplo n.º 8
0
    private void Awake()
    {
        // Register Components:
        collider = GetComponent <Collider>();
        manager  = (CLayerManager)FindObjectOfType(typeof(CLayerManager));
        renderer = GetComponent <Renderer>();


        PointLight = GetComponentInChildren <Light>();
        if (!PointLight)
        {
            Debug.LogError("ERROR: No point light found."); return;
        }

        PointLight.enabled = false;
    }
Exemplo n.º 9
0
 private void Awake()
 {
     layerManager = FindObjectOfType <CLayerManager>();
     renderer     = GetComponent <Renderer>();
 }
Exemplo n.º 10
0
 // Use this for initialization
 void Start()
 {
     manager = FindObjectOfType <CLayerManager>();
 }