QUESTION: my function does not appear in OnClick---The code I've got is not working in Unity. The function does not show up in the dropdown Menu in OnClick.

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class LearningScripts : MonoBehaviour
{
public int myFirstInteger;
public bool myFirstBool;
public bool mySecondBool;
public bool myIntegerIsGreaterThanFive;

// Start is called before the first frame update
void Start()
{
}

// Update is called once per frame
void Update()
{
if (Input.GetKeyDown("z"))
{
ResetIntegerToZero();
}
if (Input.GetKeyDown("t"))
{
SetIntegerToTen();
}
}

public void ResetIntergerToZero()
{
myFirstInteger = 0;
}
public void SetIntegerToTen()
{
myFirstInteger = 10;
}
}




Comments

Popular posts from this blog

The potential of scanography for art-making

Week 6 Potential of Video