Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Voting for the Unity Awards are OPEN! We’re looking to celebrate creators across games, industry, film, and many more categories. Cast your vote now for all categories
    Dismiss Notice
  3. Dismiss Notice

Why my entities are not running

Discussion in 'Entity Component System' started by Rewaken, Sep 3, 2018.

  1. Rewaken

    Rewaken

    Joined:
    Mar 24, 2015
    Posts:
    124
    Hello, I am using preview package 12 with 2018.2.02f






    Code (CSharp):
    1. using System.Collections;
    2. using System.Collections.Generic;
    3. using UnityEngine;
    4. using Unity.Entities;
    5. using Unity.Mathematics;
    6.  
    7. public class hybrid_instance : MonoBehaviour
    8. {
    9.     public MeshFilter Mesher;
    10.     public bool go;
    11.  
    12.  
    13. }
    14. public class test : ComponentSystem
    15. {
    16.     struct Components
    17.     {
    18.         public hybrid_instance instance;
    19.     }
    20.     protected override void OnUpdate()
    21.     {
    22.         foreach (var e in GetEntities<Components>())
    23.         {
    24.             if (e.instance.go == false)
    25.             {
    26.                 e.instance.go = true;
    27.             }
    28.         }
    29.     }
    30. }
    31.  
    Edit: Here imgur image link
    https://imgur.com/gallery/RPnXkVW
     
  2. eizenhorn

    eizenhorn

    Joined:
    Oct 17, 2016
    Posts:
    2,653
  3. Rewaken

    Rewaken

    Joined:
    Mar 24, 2015
    Posts:
    124