示例#1
0
    void Start()
    {
        if (!Interface._obj.GetModelLoadScene() && !Interface._obj.GetModelCreateScene())
        {
            androidPlugin = new AndroidPluginCallBack();

            if (androidPlugin.OpenModelLoadScene())
            {
                asyncOperation = Application.LoadLevelAsync("ModelLoad");
            }
            else
            {
                Interface._obj.SetSceneLoaded(true);
                asyncOperation = Application.LoadLevelAsync("ModelCreate");
            }
        }
        else
        {
            if (Interface._obj.GetModelLoadScene())
            {
                asyncOperation = Application.LoadLevelAsync("ModelLoad");
            }
            else if (Interface._obj.GetModelCreateScene())
            {
                Interface._obj.SetSceneLoaded(true);
                asyncOperation = Application.LoadLevelAsync("ModelCreate");
            }
        }
    }
    // Start is called before the first frame update
    void Start()
    {
        var classRef = GameObject.Find("ScriptManager").GetComponent <UnityPublicVariables>();

        doorPrefab   = classRef.GetDoorPrefab();
        wallPrefab   = classRef.GetWallPrefab();
        windowPrefab = classRef.GetWindowPrefab();

        Interface._obj.SetClassRef(classRef);



        if (!Interface._obj.GetSavedFile() && !Interface._obj.GetTempFile())
        {
            AndroidPluginCallBack androidPlugin = new AndroidPluginCallBack();

            JSONData jSONData   = new JSONData();
            string   jsonString = androidPlugin.GetJSONString();
            jSONData.JsonDataExtraction(jsonString);

            startPosValues = jSONData.GetStartPosValues();
            scalValues     = jSONData.GetScalValues();
            rotationValues = jSONData.GetRotationValues();
            color_         = jSONData.GetColor();
            objType_       = jSONData.GetObjType();
            objectLength   = jSONData.GetObjLength();

            RealModel();
        }
    }