Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Is it possible to call an OBIClothRenderer BakeMesh method
#5
(18-09-2023, 12:22 PM)michendo Wrote: I have a follow-up question, though this might be more related to O/S than OBI...

When I call up ObiEditorUtils.SaveMesh on my MacOS pops up a dialog box where I have to hit the save button. I want to automate this with no human interaction. 

Is it possible to override this dialog box so it saves immediately to the file specified?

Hi,

Yes, it's possible. Instead of using ObiEditorUtils.SaveMesh, look into Unity's AssetDatabase.CreateAsset method to save assets to disk. This is what ObiEditorUtils.SaveMesh uses internally, after asking the user for the path where the asset should be saved via a popup dialog box. You can just use CreateAsset() with a hardcoded path instead.
Reply


Messages In This Thread
RE: Is it possible to call an OBIClothRenderer BakeMesh method - by josemendez - 18-09-2023, 01:50 PM