nomoney4u
nomoney4u
CC#
Created by nomoney4u on 2/19/2024 in #help
Trying to understand this abstract code (and use it elsewhere)
It seems that protected TilemapVisualizer tilemapVisualizer = null;, when making things abstract/protected/private, the variable tilemapVisualizer was not null, but now that I made things public, this variable is Null and is not being set like before.
12 replies
CC#
Created by nomoney4u on 2/19/2024 in #help
Trying to understand this abstract code (and use it elsewhere)
I'm guessing the protected override void RunProceduralGeneration() on that function caused the tilemapVisualizer to be null?
12 replies
CC#
Created by nomoney4u on 2/19/2024 in #help
Trying to understand this abstract code (and use it elsewhere)
tilemapVisualizer.Clear(); tileMapVisualizer is now null
12 replies
CC#
Created by nomoney4u on 2/19/2024 in #help
Trying to understand this abstract code (and use it elsewhere)
When I did that I had to make other changes to for things to be public but then I now get this error:
NullReferenceException: Object reference not set to an instance of an object
SimpleRandomWalkDungeonGenerator.RunProceduralGeneration () (at Assets/Scripts/SimpleRandomWalkDungeonGenerator.cs:20)
PortalBehaviour.OnCollisionEnter2D
(UnityEngine.Collision2D portal) (at Assets/Scripts/PortalBehaviour.cs:13)
NullReferenceException: Object reference not set to an instance of an object
SimpleRandomWalkDungeonGenerator.RunProceduralGeneration () (at Assets/Scripts/SimpleRandomWalkDungeonGenerator.cs:20)
PortalBehaviour.OnCollisionEnter2D
(UnityEngine.Collision2D portal) (at Assets/Scripts/PortalBehaviour.cs:13)
12 replies
CC#
Created by nomoney4u on 2/19/2024 in #help
Trying to understand this abstract code (and use it elsewhere)
But that introduces: SimpleRandomWalkDungeonGenerator.RunProceduralGeneration()': cannot change access modifiers when overriding 'protected' inherited member 'AbstractDungeonGenerator.RunProceduralGeneration()'
12 replies