Grinya
New member
Hi.
I am new in modding with SDX and stuck at problem with scripts compilling. Need help!
After creating simple mod from Unity primitives, not much complex than Cube example in SDX package. Which is works fine. I tried to add simple script in Unity to object and stuck on "Behaviour Reference Exception..." or something like that.
I can't solve this problem. Tried to put script in Script folde and PatchScripts - no result.
So I think scripting tutorial needed.
Here my script which i added to object for game. What wrong?
Thanks!
I am new in modding with SDX and stuck at problem with scripts compilling. Need help!
After creating simple mod from Unity primitives, not much complex than Cube example in SDX package. Which is works fine. I tried to add simple script in Unity to object and stuck on "Behaviour Reference Exception..." or something like that.
I can't solve this problem. Tried to put script in Script folde and PatchScripts - no result.
So I think scripting tutorial needed.
Here my script which i added to object for game. What wrong?
Code:
using System;
using UnityEngine;
using System.Collections;
public class TestCubeScript : MonoBehaviour {
private Vector3 RSpeed = new Vector3 (1.0f,100.0f,0.01f);
// Update is called once per frame
void Update () {
this.transform.Rotate(0, RSpeed.x, 0);
if ( RSpeed.x >= RSpeed.y )
{
RSpeed.x = RSpeed.y;
} else
{
RSpeed.x += (RSpeed.z * Time.deltaTime);
}
}
}