public void MigrateData() { ObjectReference = WwiseObjectReference.GetWwiseObjectForMigration(WwiseObjectType, valueGuid); MigrateDataExtension(); if (IsValid()) { UnityEngine.Debug.Log("WwiseUnity: Converted " + Name + " in " + GetType().FullName); } ClearData(); }
public static bool ProcessSingleGuidType(UnityEditor.SerializedProperty wwiseObjectReferenceProperty, WwiseObjectType wwiseObjectType, UnityEditor.SerializedProperty valueGuidProperty, UnityEditor.SerializedProperty idProperty) { if (wwiseObjectReferenceProperty == null) { UnityEngine.Debug.LogError("WwiseUnity: This migration step is no longer necessary."); return(false); } var valueGuid = GetByteArray(valueGuidProperty); if (valueGuid == null) { var serializedObject = wwiseObjectReferenceProperty.serializedObject; UnityEngine.Debug.Log("WwiseUnity: No data to migrate <" + wwiseObjectType + "> on <" + serializedObject.targetObject.GetType() + ">."); return(false); } var objectReference = WwiseObjectReference.GetWwiseObjectForMigration(wwiseObjectType, valueGuid, GetId(idProperty)); return(SetWwiseObjectReferenceProperty(wwiseObjectReferenceProperty, objectReference)); }