Posts: 11
Threads: 4
Joined: Jul 2024
Reputation:
0
10-07-2024, 09:41 AM
Hello,
Thank you very much for the tremendous effort you put into Obi 7. I have obtained the custom package for this version. However, I have done a lot of work using Obi Fluid 6.5, and I have projects in the older version. How can I quickly update these projects to Obi Fluid 7 to avoid redundant work? When I tried to directly import the installation package and overwrite the existing one, many errors occurred.
Posts: 6,322
Threads: 24
Joined: Jun 2017
Reputation:
400
Obi Owner:
10-07-2024, 09:48 AM
(This post was last modified: 10-07-2024, 09:48 AM by josemendez.)
(10-07-2024, 09:41 AM)GuoliZheng Wrote: Hello,
Thank you very much for the tremendous effort you put into Obi 7. I have obtained the custom package for this version. However, I have done a lot of work using Obi Fluid 6.5, and I have projects in the older version. How can I quickly update these projects to Obi Fluid 7 to avoid redundant work? When I tried to directly import the installation package and overwrite the existing one, many errors occurred.
Hi!
You can't: Obi 7 is significantly different from Obi 6.5, that's why it is a major version instead of being just Obi 6.6. Components have been removed, new components have been added, etc. Installing on top of an older version will leave older scripts hanging around, with missing references to stuff that no longer exists.
You will need to uninstall 6.5 and re-do your setup using 7. We will shortly add a section to the manual explaining how to upgrade existing projects to v7.
kind regards,
Posts: 6,322
Threads: 24
Joined: Jun 2017
Reputation:
400
Obi Owner:
We have written a upgrade guide from Obi 6 to Obi 7: http://obi.virtualmethodstudio.com/manua...ading.html
let us know whether it helps, or if you need further help.
kind regards,
Posts: 11
Threads: 4
Joined: Jul 2024
Reputation:
0
(10-07-2024, 01:21 PM)josemendez Wrote: We have written a upgrade guide from Obi 6 to Obi 7: http://obi.virtualmethodstudio.com/manua...ading.html
let us know whether it helps, or if you need further help.
kind regards, Thank you!
Posts: 11
Threads: 4
Joined: Jul 2024
Reputation:
0
10-07-2024, 04:16 PM
(10-07-2024, 01:21 PM)josemendez Wrote: We have written a upgrade guide from Obi 6 to Obi 7: http://obi.virtualmethodstudio.com/manua...ading.html
let us know whether it helps, or if you need further help.
kind regards, Unfortunately, after I deleted the old Obi folder and re-exported the custom Obi Fluid 7 package, the newly added ObiSolver component turned out to be the old version, which includes the Oni solver backend. This is very strange. I hope you can provide more details on version updates, the correct order of steps, any minor issues, or tips. For example, do I need to remove references to Obi components and scripts from the scenes before deleting the old Obi components? This is very important to me, and I look forward to your response.
Posts: 6,322
Threads: 24
Joined: Jun 2017
Reputation:
400
Obi Owner:
10-07-2024, 04:51 PM
(This post was last modified: 10-07-2024, 04:55 PM by josemendez.)
(10-07-2024, 04:16 PM)GuoliZheng Wrote: Unfortunately, after I deleted the old Obi folder and re-exported the custom Obi Fluid 7 package, the newly added ObiSolver component turned out to be the old version, which includes the Oni solver backend. This is very strange.
I guess you meant re-*imported* Obi 7? If you export your Obi folder to a package, no changes will take place in your project and you will still be using Obi 6.
Quote:I hope you can provide more details on version updates, the correct order of steps, any minor issues, or tips.
It’s all explained step by step in the link I shared in my previous post, including small pitfalls and changes in API method signatures, callbacks, etc.
Quote:For example, do I need to remove references to Obi components and scripts from the scenes before deleting the old Obi components?
No, why would you? The files that make up Obi are no different than any other files in Unity: if you import a file with the same GUID than a existing one, it will replace the old file. If the file defines a component, the new component will automatically replace the old one in all scenes/prefabs. If you delete existing components from your scenes Unity will lose track of all references and you will need to re-do everything from scratch.
All that is needed is to delete the old /Obi folder, import the new one, and then remove missing references to components that no longer exist. Up to this step, this process is the same you would follow with any other Unity asset. After this, you will need to perform the steps that are specific to Obi: re-generating blueprints, updating any custom scripts that use Obi’s API, etc.
Kind regards,
Posts: 11
Threads: 4
Joined: Jul 2024
Reputation:
0
11-07-2024, 03:56 AM
(10-07-2024, 04:51 PM)josemendez Wrote: I guess you meant re-*imported* Obi 7? If you export your Obi folder to a package, no changes will take place in your project and you will still be using Obi 6.
It’s all explained step by step in the link I shared in my previous post, including small pitfalls and changes in API method signatures, callbacks, etc.
No, why would you? The files that make up Obi are no different than any other files in Unity: if you import a file with the same GUID than a existing one, it will replace the old file. If the file defines a component, the new component will automatically replace the old one in all scenes/prefabs. If you delete existing components from your scenes Unity will lose track of all references and you will need to re-do everything from scratch.
All that is needed is to delete the old /Obi folder, import the new one, and then remove missing references to components that no longer exist. Up to this step, this process is the same you would follow with any other Unity asset. After this, you will need to perform the steps that are specific to Obi: re-generating blueprints, updating any custom scripts that use Obi’s API, etc.
Kind regards, I suspect that the changes in GUIDs were caused by my extensive use of Obi Fluid 6.5 and the numerous script modifications I made. As a result, the associations were lost when reimporting Obi Fluid 7.0. Could you please advise if there is any way to repair the GUIDs of the Obi Fluid 6.5 assets so that the custom package associations are correctly maintained when importing version 7.0?
Thank you and best regards.
Posts: 11
Threads: 4
Joined: Jul 2024
Reputation:
0
(11-07-2024, 03:56 AM)GuoliZheng Wrote: I suspect that the changes in GUIDs were caused by my extensive use of Obi Fluid 6.5 and the numerous script modifications I made. As a result, the associations were lost when reimporting Obi Fluid 7.0. Could you please advise if there is any way to repair the GUIDs of the Obi Fluid 6.5 assets so that the custom package associations are correctly maintained when importing version 7.0?
Thank you and best regards. How to delete particles by “(pa.actor as ObiEmitter).life[pa.indexInActor] = 0;” in Obi fluid 7.0?
Posts: 6,322
Threads: 24
Joined: Jun 2017
Reputation:
400
Obi Owner:
11-07-2024, 10:02 AM
(This post was last modified: 11-07-2024, 10:08 AM by josemendez.)
(11-07-2024, 05:26 AM)GuoliZheng Wrote: How to delete particles by “(pa.actor as ObiEmitter).life[pa.indexInActor] = 0;” in Obi fluid 7.0?
The life array is now part of the solver, like all other data arrays (positions, velocities, etc):
Code: solver.life[solverIndices[i]] = 0;
I've corrected the manual as there was a leftover code snippet related to this, that is now obsolete.
Note that in Obi 7 you have void zones, which will reduce the particle's lifetime when in contact with them. This solves a common use case (using collision callbacks to kill particles when they reach a specific zone/area) without the need to write any code.
kind regards,
Posts: 6,322
Threads: 24
Joined: Jun 2017
Reputation:
400
Obi Owner:
11-07-2024, 10:06 AM
(This post was last modified: 11-07-2024, 10:10 AM by josemendez.)
(11-07-2024, 03:56 AM)GuoliZheng Wrote: I suspect that the changes in GUIDs were caused by my extensive use of Obi Fluid 6.5 and the numerous script modifications I made. As a result, the associations were lost when reimporting Obi Fluid 7.0. Could you please advise if there is any way to repair the GUIDs of the Obi Fluid 6.5 assets so that the custom package associations are correctly maintained when importing version 7.0?
Thank you and best regards.
If you modified Obi 6.5 to suit your needs, updating might be a a little (or a lot) more complex, depending on how extensive those modifications were. I'm afraid I can't help much without knowing what kind of changes you made to the asset.
(11-07-2024, 03:56 AM)GuoliZheng Wrote: As a result, the associations were lost when reimporting Obi Fluid 7.0.
File GUIDs don't change when modifying the file contents. They only change if the associated .meta file is lost (this can be the case if you use version control software, like git or svn, and forget to track .meta files), or if the file is deleted and created anew. You can read more about GUIDs and meta files here.
kind regards,
|