Exemple #1
0
 private void OnEnable()
 {
     if (this.componentTarget == null)
     {
         this.componentTarget = (BimData)target;
         EditorUtility.SetDirty(this.componentTarget);
     }
 }
Exemple #2
0
    // Load data in the shape of an array with two elements: geometry, and bim information.
    public void CreateGeometryAndBimInfo(string json)
    {
        GameObject gameObj        = getGameObjectFromId(json.Substring(0, 32));
        JSONObject geometryAndBim = new JSONObject(json.Substring(32));

        AddGeometryToObject(gameObj, geometryAndBim.list[0]);
        BimData b = gameObj.GetComponent <BimData> ();

        b.SetBimData(geometryAndBim.list[1]);
    }