1 (edited by drew 2024-07-07 20:42:00)

Topic: OnlineMapsCache missing?

Hi friends!  Getting up and running with OMv3 and after converting to URP I'm seeing the `OnlineMapsCache` Component missing for all the examples.  I search in the code for class OnlineMapsCache and all I see are the partials and Editors (see attached pic). 

Super excited about OM after evaluating alternatives closely.  Can't wait to show everyone what we're doing.

Post's attachments

Attachment icon Screenshot 2024-07-07 at 3.39.05 PM.png 59.43 kb, 9 downloads since 2024-07-07 

Re: OnlineMapsCache missing?

Hi.

The first item in your screenshot.

P.S. It's a partial class, to keep it from being too cumbersome, and to make it easier to develop and maintain.

Kind Regards,
Infinity Code Team.

Boost your productivity a lot and immediately using Ultimate Editor Enhancer. Trial and non-commerce versions available.

Re: OnlineMapsCache missing?

Alex Vertax wrote:

Hi.

The first item in your screenshot.

P.S. It's a partial class, to keep it from being too cumbersome, and to make it easier to develop and maintain.

Appreciate the support.  I wasn't clear enough -- the Editor isn't recognizing `OnlineMapsCache` as a valid script (it shows up as an unknown script).  Tried building library, no change.  Weird, right?  2022.3.36

4 (edited by drew 2024-07-08 17:23:44)

Re: OnlineMapsCache missing?

All the example scene have this for OnlineMapsCache.

I've never seen this issue persist after rebuilding the library, hmm.

Post's attachments

Attachment icon Screenshot 2024-07-08 at 12.21.24 PM.png 12.72 kb, 8 downloads since 2024-07-08 

Re: OnlineMapsCache missing?

If the editor does not recognise some script as valid, first of all you need to look at the console (Window / General / Console).
Most likely you have errors in some scripts there, and you need to fix them for the editor to compile other scripts (in this case OnlineMapsCache).

Kind Regards,
Infinity Code Team.

Boost your productivity a lot and immediately using Ultimate Editor Enhancer. Trial and non-commerce versions available.

6 (edited by drew 2024-07-16 00:52:46)

Re: OnlineMapsCache missing?

>>  first of all you need to look at the console (Window / General / Console).

Yes, yes -- you're adorable.



I think I found the issue -- the markup around class OnlineMapsCache:

[OnlineMapsPlugin("Cache", typeof(OnlineMapsControlBase), true)]

It's causing Unity to identify `OnlineMapsCache` as "Cache" -- effectively renaming the class name as the editor knows it.

This is consistent with no component showing up in the Add Component when typing "Online...", etc.   Rather, it does show up when "Cache" is entered, which is understandably not going to be found.  Surprised that Unity doesn't offer both, but that's Unity for you.   You should be able to reproduce this -- I'm on an M1 running 2022.3.36 but likely does not matter.

See attached screenshots.

Needless to say, adding "Cache" and the removing unknown script OnlineMapsCache component removes all issues.   Looking fwd to showing you our use of OnlineMaps and it would be a shame to have missed it on the count of that oddity.

Post's attachments

Attachment icon Screenshot 2024-07-15 at 7.47.43 PM.png 131.87 kb, 4 downloads since 2024-07-16 

Re: OnlineMapsCache missing?

What you describe is done by the AddComponentMenu attribute, not the OnlineMapsPlugin attribute.
It replaces the component name in the inspector and Add Component window with the last part of the path.
That's the way it works and I can't fix it or work around it except to use full class names in the menu, which would look ugly.

Kind Regards,
Infinity Code Team.

Boost your productivity a lot and immediately using Ultimate Editor Enhancer. Trial and non-commerce versions available.

8 (edited by drew 2024-07-16 14:01:54)

Re: OnlineMapsCache missing?

Sure, just letting you know that is somehow confusing Unity and potentially preventing people from being able to run Online Maps out of the box.  Just trying to help and support your efforts.