Closed GG3Hahn closed 4 months ago
That optional bool parameter is actually vestigial, turns out. Not exactly sure why I originally added it, but I've just made a separate commit that removes it. That commit also fixes some potential undefined behavior when trying to load a new map outside of map select.
Closing this since the feature has been added
I was getting annoyed with BeatSaver initializing a new ArcViewer frame every time I want to preview a map (and be stuck loading for 5+ seconds), so I thought "surely there must be a way to reuse one instance". As it turns out, you are able to call
gameInstance.SendMessage
from the browser window context to execute C# methods on GameObjects.SendMessage
however only allows for one parameter. Apparently the existingLoadMapInput
variant with the optionalbool
isn't compiled in the same way an overload would be and always takes 2 parameters in the assembly, so a change like this would be necessary for my desired interop.With this patch you can use
to set the map. This also works with
<iframe>
s as long as ArcViewer is hosted on the same origin.