public void AreConvertableEditorAssemblyTypesConverted() { Assembly asm = AppDomain.CurrentDomain.GetAssemblies().FirstOrDefault(a => a.FullName == "UnityEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null"); var conversionMapping = new Dictionary <Type, Type>() { { asm.GetType("UnityEditor.Audio.AudioMixerGroupController"), typeof(AudioMixerGroup) }, { asm.GetType("UnityEditor.Audio.AudioMixerController"), typeof(AudioMixer) }, { typeof(UnityEditor.SceneAsset), typeof(UnityEngine.ResourceManagement.ResourceProviders.SceneInstance) }, { typeof(UnityEditor.Animations.AnimatorController), typeof(RuntimeAnimatorController) } }; foreach (Type key in conversionMapping.Keys) { var type = AddressableAssetUtility.MapEditorTypeToRuntimeType(key, false); Assert.AreEqual(type, conversionMapping[key]); } }
public void IsRuntimeTypeNotRemapped() { Assert.AreEqual(AddressableAssetUtility.MapEditorTypeToRuntimeType(typeof(UnityEngine.Vector3), false), typeof(UnityEngine.Vector3)); }
public void IsEditorTypeRemappedToNull() { Assert.IsNull(AddressableAssetUtility.MapEditorTypeToRuntimeType(typeof(UnityEditor.AssetImporter), false)); }