Skip to content

Reset instance to initial state #154

Description

@dariooo512

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?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions