|
I'm trying to port this http://www.unifycommunity.com/wiki/index.php?title=CrossFade to C#. Right now I've this code http://pastebin.com/jZ06SvCs which doesn't work (nothing happens when I press space). Is it possible to do this in C#? Am I doing something wrong? thanks in advance, André.
(comments are locked)
|
|
Change line 23 to: Note The call to StartCoroutine().
(comments are locked)
|

i'm fighting with same issue
This is possible in C#. I don't have the code right now because I'm in the middle of integrating it from the test case (into the actual game). But you just have to set one float value for the alpha value and use it to decide both (ie. one has the
alphavariable as its alpha and one has1 - alphaas its alpha value).Note: If you are using that file as a .js file, then you may be having problems with the C# function not being able to successfully call functions from the .js file.
Edit: My solution above is for manually doing it. The other way is by changing your script loading order to ensure the .js file functions are properly loaded for usage by C#.