/// <summary> /// Called by MARS when the SynthesizedObject is initialized /// </summary> public override void Initialize() { base.Initialize(); if (MarsTrackableId.InvalidId == m_Marker.id) { m_Marker.id = MarsTrackableId.Create(); } m_IdSource = GetComponent <SynthesizedMarkerId>(); m_PoseSource = GetComponent <SynthesizedPose>(); m_ExtentsSource = GetComponent <SynthesizedBounds2D>(); if (!Guid.TryParse(m_IdSource.GetTraitData(), out var guid)) { Debug.LogWarning($"The Synthesized Marker guid on '{name}' is missing or improperly formed. " + "Image Marker Proxies may not match in simulation."); guid = Guid.Empty; } m_Marker.markerId = guid; m_Marker.texture = m_IdSource.Texture; GetData(); // We cannot guarantee that the synthetic marker has been set so use the renderer scale as initial size m_IdSource.UpdateMarkerSizeWithLocalScale(); }
/// <summary> /// Called by MARS when the SynthesizedObject is initialized /// </summary> public override void Initialize() { CopyToRuntimePlane(); m_PoseSource = GetComponent <SynthesizedPose>(); m_AlignmentSource = GetComponent <SynthesizedAlignment>(); m_ExtentsSource = GetComponent <SynthesizedBounds2D>(); }
public override void Initialize() { m_PoseSource = GetComponent <SynthesizedPose>(); }