Author Topic: How can NGUI hide elements from Replaykit on iOS?  (Read 4410 times)

dt1000

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 16
    • View Profile
How can NGUI hide elements from Replaykit on iOS?
« on: June 16, 2016, 06:39:01 AM »
Hi there.
I am implementing replay kit on my game and I want to show some recording HUD.
Is there a way to hide certain GUI elements from Replaykit when using NGUI?
Thanks,
Dan

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: How can NGUI hide elements from Replaykit on iOS?
« Reply #1 on: June 18, 2016, 04:57:36 AM »
I am not familiar with that kit, but I would say put them on a separate layer with a separate UI camera or something similar.

dt1000

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 16
    • View Profile
Re: How can NGUI hide elements from Replaykit on iOS?
« Reply #2 on: June 18, 2016, 07:12:18 AM »
Thanks, Aren,
But I'm not sure that will do the trick.
I had a look at this tutorial, which covers ReplayKit, including how to hide UI elements...
http://code.tutsplus.com/tutorials/ios-9-an-introduction-to-replaykit--cms-25458

Apparently the elements have to be in a their own separate UIWindow instance (whatever that means!)

Is there a way to do this with Unity and NGUI?

This plug-in seems to have a solution...
https://www.assetstore.unity3d.com/en/#!/content/45295
...but I already have ReplayKit working super well (just without the nice GUI hiding).

Any suggestions?

Thanks once again!
:D

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: How can NGUI hide elements from Replaykit on iOS?
« Reply #3 on: June 20, 2016, 12:46:42 AM »
Doesn't sound possible then. Unity renders everything into one window (iOS UIWindow).

r.pedra

  • Full Member
  • ***
  • Thank You
  • -Given: 7
  • -Receive: 20
  • Posts: 131
    • View Profile
Re: How can NGUI hide elements from Replaykit on iOS?
« Reply #4 on: June 21, 2016, 07:51:17 AM »
I suppose, iOS have events for when you start recording and stop recording.
You can SendMessage to Unity from ObjC code to tell Unity that the record have started/stopped and hide or display your UI depending on that.

dt1000

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 16
    • View Profile
Re: How can NGUI hide elements from Replaykit on iOS?
« Reply #5 on: June 22, 2016, 06:41:24 AM »
Hello.
The author of reK kindly got back to me regarding this issue...

Quote
Hi Dan,
 
Thanks for your message. Actually, it is a bit tricky – you need a native UI window to do that. And hiding stuff that's rendered inside Unity is not possible (except if you develop a solution that renders all your GUI in a separate native window).
 
reK features native recording controls (start/stop button) that are not visible in the recording.
 
Please let me know if you have more questions – or if I can talk you into using reK ;)
 
Greetings from Austria,
Rainer

...so it looks like what I am after is not actually possible.

Not to worry - one less thing for me to do!

Thanks for the tips everybody.

:D

Dan