
I updated everything to the latest Unity Editor. Also realized I had the wrong shaders on my hairs, those are fixed and the hairs look MUCH better!
16 lines
510 B
C#
16 lines
510 B
C#
using System;
|
|
|
|
namespace UnityEngine.Advertisements.Utilities {
|
|
public static class EnumUtilities {
|
|
public static T GetEnumFromAndroidJavaObject<T>(AndroidJavaObject androidJavaObject, T defaultValue) {
|
|
try {
|
|
return (T) Enum.Parse(typeof(T), androidJavaObject.Call<string>("toString"), true);
|
|
} catch (Exception) {
|
|
Debug.LogError("Unable to map native enum to managed enum");
|
|
}
|
|
|
|
return defaultValue;
|
|
}
|
|
}
|
|
}
|