Search Unity

  1. If you have experience with import & exporting custom (.unitypackage) packages, please help complete a survey (open until May 15, 2024).
    Dismiss Notice
  2. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice

Pickle unity object in python

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

  1. pethai2004

    pethai2004

    Joined:
    Oct 20, 2021
    Posts:
    2
    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?