Exemple #1
0
 private void Update()
 {
     if (referenceModel != null && changeCount != referenceModel.changeCount)
     {
         referenceModel.CopyModelTo(this);
     }
 }
Exemple #2
0
    public override void OnInspectorGUI()
    {
        base.OnInspectorGUI();

        LowPolyModel lpm = target as LowPolyModel;

        EditorGUILayout.LabelField("ChangeCount: " + lpm.changeCount);

        if (lpm.referenceModel != null)
        {
            if (GUILayout.Button("Apply changes to reference"))
            {
                lpm.CopyModelTo(lpm.referenceModel);
            }
        }
        else
        {
            if (GUILayout.Button("Send changes"))
            {
                lpm.changeCount++;
            }
        }
    }