private static PlatformImpl CreateImpl() { try { if (Application.isEditor) { Type type = ClassUtils.TypeForName(EditorPlatformType); if (type != null) { return(ClassUtils.CreateInstance <PlatformImpl>(type)); } else { Debug.LogError("Can't find " + EditorPlatformType + " type"); } } return(new PlatformDefault()); } catch (MissingMethodException) // FIXME: I don't like this { // unit test running Type type = ClassUtils.TypeForName("LunarPluginInternal.TestingPlatform"); return(ClassUtils.CreateInstance <PlatformImpl>(type)); } }