Exemple #1
0
        public void MigrateData()
        {
            ObjectReference = WwiseObjectReference.GetWwiseObjectForMigration(WwiseObjectType, valueGuid);

            MigrateDataExtension();

            if (IsValid())
            {
                UnityEngine.Debug.Log("WwiseUnity: Converted " + Name + " in " + GetType().FullName);
            }

            ClearData();
        }
Exemple #2
0
        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));
        }