Horje
vector2 with switch statement Code Example
vector2 with switch statement
//this goes where you're declaring variables
public Vector2 foo = Vector2.zero;

//this is what the switch statement would look like
switch (foo)
{
	case Vector2 v when v.Equals(Vector2.up):
		Debug.Log("Up");
		break;
	case Vector2 v when v.Equals(Vector2.left):
		Debug.Log("Left");
		break;
	case Vector2 v when v.Equals(Vector2.back):
		Debug.Log("Back");
		break;
}




Csharp

Related
asp.net get most recent file in directory Code Example asp.net get most recent file in directory Code Example
how to create more accurate searching c# Code Example how to create more accurate searching c# Code Example
switch case with 2 variables c# Code Example switch case with 2 variables c# Code Example
In ASP.NET Core how check if request is local Code Example In ASP.NET Core how check if request is local Code Example
c# object to xmldocument Code Example c# object to xmldocument Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
8