x


ScreenWipe CrossFade with C#

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é.

more ▼

asked Sep 14 '11 at 03:04 PM

andresp gravatar image

andresp
183 18 21 25

i'm fighting with same issue

Jun 18 '12 at 10:01 AM cupsster

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 alpha variable as its alpha and one has 1 - alpha as 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#.

Jun 18 '12 at 10:04 AM Mizuho
(comments are locked)
10|3000 characters needed characters left

2 answers: sort voted first

Change line 23 to:

yield return StartCoroutine(ScreenWipe.use.CrossFade(swap?cam1:cam2, swap?cam2:cam1, 2));

Note The call to StartCoroutine().

more ▼

answered Jun 18 '12 at 10:51 AM

simonmc gravatar image

simonmc
354 1 1 4

(comments are locked)
10|3000 characters needed characters left

Here is a C# version of the script.link text

screenwipe.zip (7.1 kB)
more ▼

answered Jul 20 '12 at 09:00 PM

LOOT gravatar image

LOOT
1

(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x4143
x2991
x82
x63

asked: Sep 14 '11 at 03:04 PM

Seen: 1234 times

Last Updated: Jul 20 '12 at 09:00 PM