Error CS1502, CS1503, and CS1061. Please help
I need help get rid of this errors regarding the mapSize
using UnityEngine;
using System.Collections;
using UnityEditor;
[CustomEditor(typeof(TileMap))]
public class TileMapEditor : Editor {
public TileMap map;
public override void OnInspectorGUI(){
EditorGUILayout.BeginVertical ();
map.mapSize = EditorGUILayout.Vector2Field ("Map Size;", map.mapSize);
EditorGUILayout.EndVertical ();
}
void OnEable(){
map = target as TileMap;
}
}
Tile$$anonymous$$ap and Tile$$anonymous$$apEditor and not part of Unity. I guess they are from the "Super Tilemap Editor" asset? As we don't know these classes, it's hard to tell what the error is. Are you sure "mapSize" is spelled this way and not "$$anonymous$$apSize" ?
Answer by tanoshimi · Nov 12, 2016 at 11:28 PM
void OnEable(){
map = target as TileMap;
}
has a typo. Should be:
void OnEnable(){
map = target as TileMap;
}
Answer by Shade30000 · Nov 13, 2016 at 02:45 AM
This might be the problem the new Vector 2 isn't blue (lol that rhymed)
Well with this code there is another problem, no semicolumn, but color can also be buggy sometimes. But yeah, he should find the source.
Your answer
Follow this Question
Related Questions
I have an error on a C# script @username 2 Answers
Nav Mesh Problem with SetDestination 1 Answer
Realidad aumentada Vuforia problema creando apk 0 Answers