I'm exploring a bit in Unity and C#, I searched everywhere for a solution without luck.
Problem:
How can I achieve this, if possible of course?
Thank you.
EDIT 1:
I tried the following:
I will keep doing my best, but my knowledge is very limited. I'll be back with more feedback if I make progress.
EDIT 2:
You can make the button a prefab and assign it on a script in the Scene B, and then when you load scene A again, it will be active.
Remember that if you use that prefab anywhere else, it will be active there too.
Example:
Example.cs:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Example : MonoBehaviour
{
public GameObject button;
// Start is called before the first frame update
void Awake()
{
button.SetActive(true);
}
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.