Пример #1
0
 /// <summary>
 /// Registers action delegate
 /// </summary>
 /// <param name="name">Display name</param>
 /// <param name="action">Callback delegate</param>
 public static void RegisterAction(string name, Action action)
 {
     #if LUNAR_CONSOLE_PLATFORM_SUPPORTED
     #if LUNAR_CONSOLE_ENABLED
     if (s_instance != null)
     {
         s_instance.RegisterConsoleAction(name, action);
     }
     else
     {
         Log.w("Can't register action: instance is not initialized. Make sure you've installed it correctly");
     }
     #else
     Log.w("Can't register action: plugin is disabled");
     #endif
     #endif
 }
Пример #2
0
 /// <summary>
 /// Registers action delegate
 /// </summary>
 /// <param name="name">Display name</param>
 /// <param name="action">Callback delegate</param>
 public static void RegisterAction(string name, Action action)
 {
     #if LUNAR_CONSOLE_PLATFORM_SUPPORTED
         #if LUNAR_CONSOLE_FULL
             #if LUNAR_CONSOLE_ENABLED
     if (s_instance != null)
     {
         s_instance.RegisterConsoleAction(name, action);
     }
     else
     {
         Log.w("Can't register action: instance is not initialized. Make sure you've installed it correctly");
     }
             #else  // LUNAR_CONSOLE_ENABLED
     Log.w("Can't register action: plugin is disabled");
             #endif // LUNAR_CONSOLE_ENABLED
         #else  // LUNAR_CONSOLE_FULL
     Log.w("Can't register action: feature is not available in FREE version. Learn more about PRO version: https://goo.gl/TLInmD");
         #endif // LUNAR_CONSOLE_FULL
     #endif // LUNAR_CONSOLE_PLATFORM_SUPPORTED
 }