Skip to content

Reset instance to initial state #154

@dariooo512

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?

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