Answers for "how to convert to int unity"

C#
2

how to turn string to int in unity

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Example : MonoBehaviour
{
	int i;+
    string text = "100";
	void Start()
	{
		i = System.Convert.ToInt32(text); // Turns i to 100
	}
}
Posted by: Guest on May-28-2021
11

unity to integer

int.Parse("500");
Posted by: Guest on February-17-2020

C# Answers by Framework

Browse Popular Code Answers by Language