So, I'm making a script to make a transition effect on a piece of UI, and I get the error cs1525 in the editor, but nothing appears in MonoDevelop. The code is pasted here:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class rotateTransition : MonoBehaviour {
public bool rotateInHorizontally;
public bool rotateInVertically;
public void rotateIn()
{
#if rotateInHorizontally == True && rotateInVertically != True
{
Transform.rotate (90, 0, 0);
}
#else
#if rotateInVertically == True && rotateInHorizontally != True
{
Transform.rotate(0,90,0);
}
}
public void rotateOut()
{
#if rotateInHorizontally == True && rotateInVertically != True
{
Transform.rotate (-90, 0, 0);
}
#else
#if rotateInVertically == True && rotateInHorizontally != True
{
Transform.rotate(0,-90,0);
}
}
}
Its a very simple piece of code, accessing the local transform component and rotating the panel after it's activated by the button. Please help me!!
↧