- Home /
When the user clicked already the sticker , it has to be show in the board..But..
But, every time I run the game the stickers always cannot be seen. I wanted to click the sticker button(on the sticker panel) and show it on the board(I got this part) but when I runs the game it doesn't show the stickers I've already clicked. Can someone help me on this part?? I'm a beginner with Unity. Thank you. 
Here's the code:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class StickerGameControl : MonoBehaviour {
public Button selectLumpia;
public Button selectFriedChicken;
public GameObject LumpiaStickerCollection;
public GameObject FriedChickenStickerCollection;
int clickTimes = 0;
// Use this for initialization
void Start () {
}
void Update(){
}
public void SelectLumpia()
{
LumpiaStickerCollection.gameObject.SetActive(true);
selectLumpia.interactable = false;//disable the button
}
public void SelectFriedChicken()
{
FriedChickenStickerCollection.gameObject.SetActive(true);
selectFriedChicken.interactable = false;//disable the button
}
}
@$$anonymous$$ishu05 Do you want to persist the state across multiple separate game sessions? If so, you need to store the data persistently in some way (e.g. using a database, or a local text file like Json, or PlayePrefs).
Your answer
Follow this Question
Related Questions
create a button with name and text for every game object with tag 0 Answers
Destroy object after clicking button few times. 1 Answer
Central score counter for 3 score generating buttons 1 Answer
How to acces Scribtable object data from button? 1 Answer
Is is possible to override the default Button editor? 0 Answers