Example #1
0
        public void setupFullReferencesInModel(AXModel model)
        {
            //Debug.Log ("SETTING UP REFERENCES IN MODEL pA_guid="+pA_guid);
            // USE THIS TO INITIALIZE REFERENCES AFTER DESERIALIZATION

            if (pA_guid != null && pB_guid != "")
            {
                // - pA
                //Debug.Log ("pA_guid="+pA_guid);
                pA = model.getParameterByGUID(pA_guid);
                if (pA != null && !pA.relations.Contains(this))
                {
                    //Debug.Log ("AXRelation::setupReferencesInModel - relations.add pA="+pA.Name+" : " + pA.Guid);
                    pA.relations.Add(this);
                }
                // - pA
                pB = model.getParameterByGUID(pB_guid);

                if (pB != null && !pB.relations.Contains(this))
                {
                    //Debug.Log ("AXRelation::setupReferencesInModel - relations.add pB="+pB.Name+" : " + pB.Guid);
                    pB.relations.Add(this);
                }
            }
            //Debug.Log (toString ());
        }
 // Use this for initialization
 void Start()
 {
     if (!string.IsNullOrEmpty(P_GUID))
     {
         P = model.getParameterByGUID(P_GUID);
     }
 }