Search Unity

Searching for High Quailty Docs on IMPL_APP_CONTROLLER_SUBCLASS

Discussion in 'iOS and tvOS' started by MrPhil, Aug 31, 2016.

  1. MrPhil

    MrPhil

    Joined:
    Sep 22, 2010
    Posts:
    40
    My google search hasn't turned up any useful information on how to use this macro when an SDK plugin is already using it and you need to subclass their class that subclasses the UnityAppController via the IMPL_APP_CONTROLLER_SUBCLASS.
     
  2. Alexey

    Alexey

    Unity Technologies

    Joined:
    May 10, 2010
    Posts:
    1,624
    >>when an SDK plugin is already using it and you need to subclass their class
    that is not intended way to use it. The intended was: you create your custom app controller and you call whatever you need to init plugins. You may subclass theirs but then you need to replace call to IMPL_APP_CONTROLLER_SUBCLASS with their (base) class to call with your class
     
  3. MrPhil

    MrPhil

    Joined:
    Sep 22, 2010
    Posts:
    40
    Right, that is what I tried but for some reason Push Notification registration went straight to the SDK's method instead of my custom app controller. I also found some strange execution error problems where methods where getting called before it was safe to call super. The other thing I suspect was happening is "MyCustomUnityAppController" wouldn't get called if the "VedorUnityAppController" didn't override them too.

    I abandoned the approach and simply hacked up the vendors UnityAppController. I'll pay a price later when the vendor updates their SDK, but better than wasting time trying to figure out these odd problems, especially without any docs.

    Thanks.
     
  4. eppz

    eppz

    Joined:
    Aug 2, 2014
    Posts:
    172
    Hey @Alexey,
    is there a thing like IMPL_APP_CONTROLLER_SUBCLASS (or
    AppControllerClassName in particular) for OSX?
     
  5. bdominguezvw

    bdominguezvw

    Joined:
    Dec 4, 2013
    Posts:
    96
    Have you thought about this? When you use different assets from Asset Store you can't know this and it's a real problem.

    Is there no better way to achieve that allows N implementations?
     
  6. eppz

    eppz

    Joined:
    Aug 2, 2014
    Posts:
    172