Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only.

    Please, do not make any changes to your username or email addresses at during this transition time.

    It's still possible to reply to existing private message conversations during the migration, but any new replies you post will be missing after the main migration is complete. We'll do our best to migrate these messages in a follow-up step.

    On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live.

    Read our full announcement for more information and let us know if you have any questions.

Pickle unity object in python

Discussion in 'ML-Agents' started by pethai2004, May 23, 2022.

  1. pethai2004


    Oct 20, 2021
    I try to serialize unity object python but the error occurs: TypeError: cannot pickle '_thread.lock' object
    where I use pickle.dumps(file) but it couldn't work as I expected. Note that Unity MLagent implementation also uses subprocess module to call unity executable the same way I do.Is there any other way to serialize unity objects in python? Or some way to distributed simulation in unity in multiple processing via python?