Hi everyone!
I’ve been working on my first eve C# code (been writing python for years and been trying to adapt…), basically I’ve been having some issues with implementing the script to Unity- after script is done (sort of) I save and go back to unity, the script component is on object and set to the right script but no variables are available for change in editor (grey out).
A script Issue?
A namespace issue?
An Editor setting?
I am using unity 2019.1.5 and visual studio 2019
added editor screenshot
the code-
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Layers : MonoBehaviour
{
public RectTransform container;
public bool isOpen;
// Start is called before the first frame update
void Start()
{
container = transform.FindChild(“Container”).GetComponent();
isOpen = false;
}
// Update is called once per frame
void Update()
{
Vector3 scale = container.localScale;
scale.y = Mathf.Lerp(scale.y, isOpen ? 1 : 0, Time.deltaTime * 12)
container.localScale = scale;
}
}
