Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Broken scripts with update 6 -> 7
#2
(21-12-2024, 10:35 AM)hariedo Wrote: Had some issues with the update from Obi Rope 6 -> 7 in a project that used Obi Rope 6.  Luckily it's a scratch project.

1.  I tried upgrading on top of the old version but saw script errors so I removed all Obi files and installed fresh instead.  Of course, I have scripts and prefabs that depend on the older Obi files, so all of those break in the process of installation. 

Hi!

You can't install Obi 7 on top of a pre-existing Obi 6 installation, doing so will cause multiple compilation errors due to missing files/newly added ones. You must delete the /Obi folder and do a fresh install as explained in the upgrade guide.

Upgrading will require updating all your scripts and prefabs as warned in the manual. Several systems in Obi are now asynchronous (for instance, ObiRopeCursor) so scripting logic changes quite a bit. It's not a quick process. You should evaluate whether it's necessary for you to upgrade your project or stay on Obi 6, and maybe try 7 on upcoming projects.

(21-12-2024, 10:35 AM)hariedo Wrote: Even after the other issues were patched below, my existing code runs into Index Of Of Range errors on trying to load my existing rope blueprints, so now I have to see if it's a code issue or a blueprint schema change issue.  [Edit: I see the forum update guide says you have to regen blueprints.  I'm creating them from code, see below.]

There's been some changes to the scripting API as well, see the guide above.

(21-12-2024, 10:35 AM)hariedo Wrote: 2.  The demo scenes use a resource script called FPSDisplay.  It does not use a namespace, so it conflicted with another script I already had called FPSDisplay.  This caused compilation errors and breaks the script references in scenes that used either one (my existing scenes, as well as your demo scenes.)  Even after I added a namespace to my existing FPSDisplay, the script references were broken, so I had to add a namespace to your file and re-add it to the demo scene objects.  I thought Unity demanded all assets used namespaces to avoid this sort of conflict. 

Thanks for reporting this! FPSDisplay does not indeed have its own namespace, could find a few other sample scripts that don't either. Will fix this in the next update.

(21-12-2024, 10:35 AM)hariedo Wrote: [Edit:  Similar breakage on SlowmoToggler which does not have a namespace (I have no such script but your demo scene had a broken link to it and Unity couldn't find it until I added one).]


This component is used in the "RopeAndJoints" scene, and it is added to the ObiSolver component. Just downloaded the asset fresh from the store  but could not find any missing references/broken links to SlowmoToggler. Unity's asset verification process does not report any either.


(21-12-2024, 10:35 AM)hariedo Wrote: 3.  Many of your demo scenes use a built-in diffuse material for many objects.  Please define your own material for these objects, so that when I update all materials to URP these objects don't remain pink.

Diffuse materials should also be picked up by Unity's auto-updater. Most of the objects in the scenes just use the Standard shader.

(21-12-2024, 10:35 AM)hariedo Wrote: 4.  There is no longer a type for ObiFixedUpdater.  I had a script that expected this type to force a regeneration of ropes (as I would deactivate and reactivate ropes in proximity to the player).  The CHANGELOG says all ObiUpdater types have been removed.  No guidance on what to do about scripts that referenced them.

See the upgrade guide for details on what to do:

Quote:In Obi 7, all ObiUpdater components have been removed. ObiSolvers now update themselves at the right time, automatically parallelizing work with other solvers in the scene. You should open up your scenes/prefabs and remove missing references to these components:

-ObiFixedUpdater
-ObiLateFixedUpdater
-ObiLateUpdater

The substeps parameter in the updaters has been moved to the ObiSolver component. It is important that you adjust the amount of substeps in your ObiSolver to match the value your ObiUpdater was using, as too many substeps can have a large impact on performance.



Quote:Here is the code I'm trying to migrate.  It generates new blueprints on the fly during Start.

My prefab has four of these, and each one is spitting out Null Reference errors in your DrawGizmos in Edit mode.

Once I try running, I get Index Out Of Bounds errors in your ObiActor.LoadBlueprintParticles, when I provide the generated blueprint to ObiRope.  One error per rope, with different starting index numbers.

Will try your script and get back to you asap. At a first glance, the cursor related code acts as if the change in length is immediate - which no longer is - so it will likely break.

kind regards,
Reply


Messages In This Thread
Broken scripts with update 6 -> 7 - by hariedo - 21-12-2024, 10:35 AM
RE: Broken scripts with update 6 -> 7 - by josemendez - 23-12-2024, 09:34 AM