Skip to content

Newer version of Unity (2019 LTS) throws NativeArray not allocated exception when trying to draw tree #9

@VergilUa

Description

@VergilUa

This happens because of NativeQuadTree.Draw tries to GetEnumerator from results, which does not exist.
Can be simply fixed by checking if results list exist like so:

if (results.IsCreated) {
	foreach (var element in results) {
		texture[(int) ((element.pos.x + widthAdd) * widthMult)][(int) ((element.pos.y + heightAdd) * heightMult)]	= Color.green;
	}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions