Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reset instance to initial state #154

Open
dariooo512 opened this issue Apr 2, 2024 · 0 comments
Open

Reset instance to initial state #154

dariooo512 opened this issue Apr 2, 2024 · 0 comments

Comments

@dariooo512
Copy link

I'm studying how this library works and I'm facing a situation where I Need to reset the position of a robot after some conditions.

I see that in an example to achieve this, the object gets destroyed and recreated as such:

if (robot != null)
    DestroyImmediate(robot);

Simulation.Instance.Native.garbageCollect();
m_isDisabled = false;
robot = Instantiate(Resources.Load<GameObject>("IRB6700_220_265_SW6_LeanID"));
InitializeRobot();

I can't use this approach due to performance issues, is there any proper way to implement this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant