public void SetUp()
    {
        // Player
        GameObject prefab = Resources.Load <GameObject>("Prefabs/Player_Mock");

        testObj      = GameObject.Instantiate(prefab);
        testObj.name = "Player";

        // RayReciever
        reciever = testObj.GetComponent <RayReciever>();

        // Gui
        prefab   = Resources.Load <GameObject>("Prefabs/UI/GUI");
        gui      = GameObject.Instantiate(prefab);
        gui.name = "GUI";
    }
示例#2
0
    public void SetUp()
    {
        //RaySource
        GameObject prefab = Resources.Load <GameObject>("Prefabs/XRaySource");

        source      = GameObject.Instantiate(prefab);
        source.name = "XRaySource";

        // Player / RayReciever
        prefab       = Resources.Load <GameObject>("Prefabs/Player_Mock");
        testObj      = GameObject.Instantiate(prefab, new Vector3(3f, 0f, 0f), Quaternion.identity);
        testObj.name = "Player";

        reciever = testObj.GetComponent <RayReciever>();

        // Gui
        prefab   = Resources.Load <GameObject>("Prefabs/UI/GUI");
        gui      = GameObject.Instantiate(prefab);
        gui.name = "GUI";
    }