Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Unity on Linux - Unity event on PC awoken after suspend?

Discussion in 'Linux' started by Deleted User, Jul 11, 2017.

  1. Deleted User

    Deleted User

    Guest

    Hello all,

    We are making a native plugin for Unity that is doing some rendering and showing textures on the screen with OpenGL for Linux.

    After PC is put to Suspend/Sleep mode and then is awoken it seems our textures are corrupted, but the rest of the game looks perfectly fine (probably Unity is handling this internally) so we need to recreate them (we have such an API so this is not a problem).

    Unfortunately detecting this is proven impossible for now - we don't see any OpenGL errors, there is no call to native code handling graphic device events (UNITY_INTERFACE_API UnityPlugin::OnGraphicsDeviceEvent) and we could not find any Unity event that could be used to detect PC is awoken after Suspend/Sleep.

    We've tested this on x86_64 Ubuntu17.04 with Nvidia 1050Ti using latest drivers (381.22).
    The game is build from Windows using Unity3D v5.4.0f3

    Did someone experienced similar issues?
    Is there any Unity event that we can use?
     
    Last edited by a moderator: Jul 11, 2017
  2. Tak

    Tak

    Joined:
    Mar 8, 2010
    Posts:
    1,001
    I think we don't currently have an event for this - it probably does make sense to add one.