void Build() { if (part != null) { var displayConfig = new PartConfig(); // if just showing in editor, set readonly and dontsave flag on generated objects if (!Application.isPlaying) { displayConfig.Save <bool>(ConfigTag.PartReadOnly, true); displayConfig.Save <bool>(ConfigTag.PartDontSave, true); } partGo = part.Build(displayConfig, gameObject, part.name); } }
protected virtual void DisplayModel() { if (displayedGos != null) { ClearModel(); } // don't display if application is playing if (Application.isPlaying) { return; } // build display config to hide built objects and not save var displayConfig = new PartConfig(); displayConfig.Save <bool>(ConfigTag.PartHide, true); displayConfig.Save <bool>(ConfigTag.PartDontSave, true); // build the part for (var i = 0; i < targets.Length; i++) { var panel = (PanelApplicator)targets[i]; if (panel.top != null) { displayedGos.Add(panel.top.Build(displayConfig, null, "display")); } if (panel.bottom != null) { displayedGos.Add(panel.bottom.Build(displayConfig, null, "display")); } if (panel.left != null) { displayedGos.Add(panel.left.Build(displayConfig, null, "display")); } if (panel.right != null) { displayedGos.Add(panel.right.Build(displayConfig, null, "display")); } if (panel.front != null) { displayedGos.Add(panel.front.Build(displayConfig, null, "display")); } if (panel.back != null) { displayedGos.Add(panel.back.Build(displayConfig, null, "display")); } } }
protected virtual void DisplayModel() { if (displayedGos != null) { ClearModel(); } // don't display if application is playing if (Application.isPlaying) { return; } // build display config to hide built objects and not save var displayConfig = new PartConfig(); displayConfig.Save <bool>(ConfigTag.PartHide, true); displayConfig.Save <bool>(ConfigTag.PartDontSave, true); // build the part for (var i = 0; i < targets.Length; i++) { displayedGos.Add(((Part)targets[i]).Build(displayConfig, null, "display")); } }