Game-breaking bug in v1.11.0
electrum-bowie opened this issue · 19 comments
I'm not at my computer right now, but I'm just making sure that you guys are aware, I don't have the error logs because I instantly downgraded to the previous one and I didn't have time to do anything else that day either way.
The error logs had to do with something related to 'ellipsoid', and each time I tried to write to the 'longitudeLatitudeHeight' property the code failed with that error in the console, completely breaking my project...
If you aren't aware of this, I'll continue providing info here when I get the chance
Hey @electrum-bowie, thanks for letting us know. Can you provide step-by-step instructions for reproducing the error? It would help us to have a minimal reproducible example.
The error logs had to do with something related to 'ellipsoid',
and each time I tried to write to the 'longitudeLatitudeHeight' property the code failed with that error in the console
,completely breaking my project...
@electrum-bowie Do you mean setting the longitudeLatitudeHeight
property on a CesiumGlobeAnchor
? I've tried setting this property in the latest version of Cesium for Unity and I'm not able to reproduce this bug. Could you share a sample of the code you were using that was causing this issue?
Through code, of course setting it through the UI would work
Setting it through the inspector calls the same method as setting it from code, so I'm not sure it's "of course." 😉 Regardless, I tested with a script. This is the script I used:
using CesiumForUnity;
using System.Collections;
using System.Collections.Generic;
using Unity.Mathematics;
using UnityEngine;
public class Test : MonoBehaviour
{
// Update is called once per frame
void Update()
{
var anchor = GetComponent<CesiumGlobeAnchor>();
anchor.longitudeLatitudeHeight = double3.zero;
}
}
If you run this in your project on Cesium 1.11.0, does this cause an issue?
@electrum-bowie Are you still experiencing this issue?
If I go back to the latest version, yes, everything breaks in my project because of this "elipsoid" error.
I unfortunately don't have time to go back and experiment more.. i just wanted to inform you about this extreme bug.
I am forced to stay on an other version for now
seems like the issue is now gone
after running:
private void LoadSavedVectorLastLocation()
{
double x = PlayerPrefs.GetFloat("VectorLastLocationX", 0);
double y = PlayerPrefs.GetFloat("VectorLastLocationY", 0);
double z = PlayerPrefs.GetFloat("VectorLastLocationZ", 0);
if (x != 0 && y != 0 && z != 0)
{
cesiumAnchor.longitudeLatitudeHeight = new double3(x, y, z);
}
}
at Start();
I see the issue - if the globe anchor is disabled, _georeference
will be null, so that line will fail. I've created a PR for a fix.
Perfect !