Hello,
I was able to make a build but none of my scripts are running. In console it show error
To test i created a scene with a cube and attach this script
using UnityEngine;
using System.Collections;
public class ObRotate : MonoBehaviour
{
public Vector3 _Speed;
// Update is called once per frame
void Update ()
{
float dt = Time.deltaTime;
transform.Rotate (_Speed.x * dt, _Speed.y * dt, _Speed.z * dt);
}
}
I can see cube rotation in IDE, but on build cube is still. For this script Unity throw same serialization error. Unity also throw script name mismatch error
As for later error, your script file should be names ObRotate.cs
The first one is probably because you have wrapper some member variable with #UNITY_EDITOR.
As you can see the code there is nothing in #if UNITY_EDITOR. Script name is same as class. If i am not wrong it wont work in IDE too. Unity doenst allow to attach if file name and class name is not same.
Looks like something is messed up. Try to reimport project.
You can also try to delete all folders with intermediate output and then open project with Unity editor again.
Actually i did delete my Library folder for reimport but it didnt work. I dont know why i get Predefine.cs warning while making a build for this project. I setup a new project and it work fine without getting Predfined.cs warning.
My current project is big and it has some third party plugins. Prime31 and Unibill. Not sure if that causing problem.
Turn out problem with Unibill. Still need to dig more. Removing the references of Unibill/Src solve the serialization error. I still get Predefines.cs error. But game script work.