Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

SceneManager makes Raycast vanish.

Discussion in 'ML-Agents' started by hammer_head, May 6, 2020.

Thread Status:
Not open for further replies.
  1. hammer_head

    hammer_head

    Joined:
    Nov 4, 2018
    Posts:
    11
    Hi ,

    I use (during training )SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex); to reload the current scene , the moment above is line is hit I am unable to view Ray Perception Sensor 's rays in scene view.

    until the SceneManager is not triggered , Ray Perception Sensor rays are visible in scene view during training .

    Is this bug ? or am I missing anything ?

    no errors or warnings just raycast wont work.

    Thanks
     
  2. TreyK-47

    TreyK-47

    Unity Technologies

    Joined:
    Oct 22, 2019
    Posts:
    1,799
    We'll flag this for the team to have a look. Which version of C# and Python are you using?
     
  3. christophergoy

    christophergoy

    Unity Technologies

    Joined:
    Sep 16, 2015
    Posts:
    735
    HI @hammer_head,
    Which version of ML-Agents are you using? There was a fix in the latest release for scene loading issues. Could you try that out and let us know if you're still seeing the issue?
     
  4. hammer_head

    hammer_head

    Joined:
    Nov 4, 2018
    Posts:
    11
    Hi ,

    I am using Latest_release , I still see the issue . To reproduce the issue download Unity flappybird , attach a ray sensor to Bird , you will see sensor will do fine till bird dies , once the bird dies the Scene is recreated with SceneManager and this in turn vanishes sensor from scene view and we can no longer see sensor rays.

    Version information:
    ml-agents: 0.16.0,
    ml-agents-envs: 0.16.0,
    Communicator API: 1.0.0,
    TensorFlow: 2.2.0-rc3


    Thanks
     
    Last edited: May 9, 2020
  5. hammer_head

    hammer_head

    Joined:
    Nov 4, 2018
    Posts:
    11
    Hi ,

    Any updates for me on this?

    Thanks.
     
  6. hammer_head

    hammer_head

    Joined:
    Nov 4, 2018
    Posts:
    11
    Hi , Please close this Thread , this issue is resolved in Latest release.:)
     
Thread Status:
Not open for further replies.