Skip to content

get entity count from engine through code #1345

Discussion options

You must be logged in to vote

Hello @JustAnotherGameDevWasTaken,

C# is not difficult to learn but obviously everything takes some time to learn 😀. There are nice tutorials out there.. e.g. https://dotnet.microsoft.com/en-us/learn/csharp

Regarding your question, I think there are 2 ways.

 public class YourScript : StartupScript
    {
        public override void Start()
        {
            var sceneEntities1 = Entity.Scene.Entities;
            var sceneEntities2 = SceneSystem.SceneInstance.RootScene.Entities;
        }
    }

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@JustAnotherGameDevWasTaken
Comment options

@VaclavElias
Comment options

@JustAnotherGameDevWasTaken
Comment options

Answer selected by JustAnotherGameDevWasTaken
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants