Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

unity actions

//An Action is basically an interface for any method which has no return 
//and no input parameters, that's it.

//So you can assign to your Action variable an anonymous method:

class ExampleClass
{
    public static event Action<string> loginSucceededEvent;
}

ExampleClass.loginSucceededEvent = delegate (string str)
{
  //
  // Add your code here;
  //
};

//or you can use this common method:
Action someAction += someMethod1;
Action someAction += someMethod2:
 
someAction(); // <-- calls someMethod1 and someMethod2

// then this happens:
 
void someMethod1()
{
     //something happens here
}
 
void someMethod2()
{
     //something else happens here
}
Comment

PREVIOUS NEXT
Code Example
Csharp :: get out of foreach statement c# 
Csharp :: Throw index out of range C# 
Csharp :: c# how to call a method from another class 
Csharp :: getcomponent unity 
Csharp :: unity new vector3 
Csharp :: how return only value of array in laravel 
Csharp :: unity call function on animation end 
Csharp :: c# new object without class 
Csharp :: Configure Automapper 
Csharp :: turn list of string to csv c# 
Csharp :: c# bitmap to array byte 
Csharp :: git find commits by file path 
Csharp :: dotnet new api 
Csharp :: get index c# 
Csharp :: c# dictionary values to list 
Csharp :: string to datetime c# 
Csharp :: unity find object by name 
Csharp :: 1 line if c# 
Csharp :: Entity Framework Core 3.1 Return value (int) from stored procedure 
Csharp :: adding values to mock IHttpContextAccessor unit test .net core 
Csharp :: unity cancel momentum 
Csharp :: unity gui text 
Csharp :: unity check if camera can see object 
Csharp :: else if c# 
Csharp :: C# async to sync 
Csharp :: c# signalr console app client example 
Csharp :: c# join strings with comma 
Csharp :: c# add time to datetime 
Csharp :: cast char[] to string c# 
Csharp :: c# allowedusernamecharacters 
ADD CONTENT
Topic
Content
Source link
Name
2+6 =