Skip to content

Instantly share code, notes, and snippets.

@ArcherN9
Created March 2, 2019 14:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ArcherN9/26a1223973dcf78908cec7d09420c7dc to your computer and use it in GitHub Desktop.
Save ArcherN9/26a1223973dcf78908cec7d09420c7dc to your computer and use it in GitHub Desktop.
Placenote SDK - Unity - ARKit
/// code here
private LibPlacenote.MapMetadataSettable mCurrMapDetails;
/// code here
// Executed when the scene comes back to the forescreen.
// Think of this as onResume of the Android activity lifecycle
private void OnEnable()
{
Tools.Log("Read Map : On Enable executed");
// Print the current status
Tools.Log("Read Map : Current LibPlacenote Status : " + LibPlacenote.Instance.GetStatus() + " | Initialized? : " + LibPlacenote.Instance.Initialized());
// If a map info is saved in the object, re-initiate Libplacenote instance
if(mSelectedMapInfo != null) {
Tools.Log("Read Map : Restarting LibPlacenote instance");
LibPlacenote.Instance.StartSession(true);
}
}
// Use this for initialization
void Start() {
Tools.Log("Read Map : OnStart executed");
// Code here
// Attach the listener that tells the states of placenote
LibPlacenote.Instance.RegisterListener(this);
FeaturesVisualizer.DisablePointcloud();
// Code here
Tools.Log("Read Map : Libplacenote status : " + LibPlacenote.Instance.Initialized() + ". mARKitInit Flag : " + mARKitInit.ToString());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment