Closed petrepa closed 4 years ago
Made ParticipantNumber.cs and added to some text objects on the main scene.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class ParticipantNumber : MonoBehaviour
{
const string glyphs= "ABCDEFGHIJKLMNOP0123456789"; //add the characters you want
private Text text;
void Start(){
text = GetComponent<Text>();
var partNum = "";
for(int i=0; i<4; i++)
{
partNum += (glyphs[Random.Range(0, glyphs.Length)]).ToString();
}
text.text = "#" + partNum;
}
}
Commit: https://github.com/petrepa/TFE4580/commit/2218c7649328e909d11e97cc71c0006201828371
To log participant without revealing identification.