Hello everyone.

The Mixed Reality Forums here are no longer being used or maintained.

There are a few other places we would like to direct you to for support, both from Microsoft and from the community.

The first way we want to connect with you is our mixed reality developer program, which you can sign up for at https://aka.ms/IWantMR.

For technical questions, please use Stack Overflow, and tag your questions using either hololens or windows-mixed-reality.

If you want to join in discussions, please do so in the HoloDevelopers Slack, which you can join by going to https://aka.ms/holodevelopers, or in our Microsoft Tech Communities forums at https://techcommunity.microsoft.com/t5/mixed-reality/ct-p/MicrosoftMixedReality.

And always feel free to hit us up on Twitter @MxdRealityDev.
Options

UIText Prefab not reloading after switching scenes

Hello, I developed a system where when I click on a button (circle button prefab) it will display a line of text from the UIText Prefab in the holotoolkit, and then when I click on the button a second time, the text is deleted. However, I recently included a second scene and after visiting the second screen, the button no longer displays the text? Have any of y'all run into this before?

Code:
public class TextAppear : MonoBehaviour, IInputClickHandler {
public GameObject TextPrefab;
bool NumberPressed = false;
GameObject TextPrefabClone;

public void OnInputClicked(InputClickedEventData eventData)
{
    if (NumberPressed == false){
        NumberPressed = true;
        TextPrefab.SetActive(true);
        TextPrefabClone = Instantiate(TextPrefab);
        TextPrefabClone.SetActive(true);
        var position = gameObject.transform.position;
        TextPrefabClone.gameObject.transform.position = new Vector3(position.x, position.y + .1f, position.z);
    }
   else
    {
        NumberPressed = false;
        Destroy(TextPrefabClone);

}

Thanks Again! and sorry the code is kinda messy right now, I was playing around with the set Active settings to see if I could get it to work.

Sign In or Register to comment.