Hi all,
I finally got around to upgrading to unity 2 indie, so am looking forward to all the good things ahead.
Theres going to be a few compiling issues scriptwise, so I thought I’d keep them in one thread, and I invite anyone who is having trouble with conversion to post here, and I invite anyone who can help, to throw in their 2c. I thank you all in advance for any help, and hopefully this is a good place to come when your stuck.
I have a 4.5 gig “random scripts, packages and experiments” project folder, and converting it to a Unity 2 project took over 14 hours! I went to bed at 14 hours to wake up and it was done, so now Im fixing the depreciated script samples.
Issue 1:
I have this script, in fact it might only work in unity pro, but I’ll get it to compile anyway, just in case its indie compatible, and as an excercise of understanding:
var texture : FileTexture;
var framesPerSecond = 12.0;
function Update () {
// Calculate the frame to use by repeating time when it exceeds playLength
frameCount = texture.frameCount;
playLength = frameCount / framesPerSecond;
time = Mathf.Repeat (Time.time, playLength) / playLength;
var frame : int = time * frameCount;
frame = Mathf.Clamp (frame, 0, texture.frameCount -1);
texture.frame = frame;
}
function Reset () {
if (renderer) {
texture = renderer.sharedMaterial.mainTexture;
}
}
So Im aware that fileTexture is now Texture2D, but if I change that part to Texture2D[ ] I still get a compile error.
Thanks for any help offered!
AaronC