private void Update() { if (PlacablePrefab_ == null) { return; } if (InputDevice_.Action3.WasReleased) { UndoHistory_.RecordState(); Place(); Refresh(ignoreCheck: true); } }
protected void Place() { int uniqueId = SerializeToDynamicData(); bool hasAttributes = attributeDatas_ != null && attributeDatas_.Count > 0; if (hasAttributes) { bool validUniqueId = uniqueId > 0; if (validUniqueId) { foreach (var attributeData in attributeDatas_) { AttributeDynamicArenaDataWriter.Serialize(attributeData, uniqueId, DynamicArenaData_); } } else { Debug.LogWarning("Cannot add attributes to invalid uniqueId - will not add!"); } } UndoHistory_.RecordState(); }