- Home /
Hashsets Unity iOS
Do HashSets work on Unity iOS?
Comment
Best Answer
Answer by ina · Jan 31, 2014 at 05:44 PM
It looks like HashSets work on iOS (not just in editor)
using UnityEngine; using System.Collections; using System.Collections.Generic;
public class HashSets : MonoBehaviour {
string hash;
void Start(){
GenHash ();
}
void GenHash(){
hash = "";
HashSet<Vector2> hashset = new HashSet<Vector2> ();
for(int i=0;i<100;i++){
hashset.Add (new Vector2(Random.value,Random.value));
}
foreach (Vector2 v in hashset) {
hash+=v.ToString();
}
}
void OnGUI(){
GUI.Label (new Rect(5,5,Screen.width,Screen.height),hash);
}
}
Your answer
![](https://koobas.hobune.stream/wayback/20220613132212im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
NotSupportedException while Xcode Building 0 Answers
sqlite plugin anomalies on ios 0 Answers
PtrToStructure with array fields on iOS (ie AOT only mode) 0 Answers
Unhandled Exception: Mono.CSharp.InternalErrorException: Internal error 1 Answer
Are there any tips for speeding up SQLite through Unity on iOS 1 Answer