Newer
Older
Traffic-Simulator / Assets / Scripts / Roads / Node / NodeData.cs
@biosfood biosfood on 12 Oct 2022 350 bytes load nodes from file
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class NodeData : MonoBehaviour {
    public Node node =  null;
    public Config config;

    public virtual void Start() {
        node.config.roadNetwork.nodes.Add(node);
    }

    void OnDestroy() {
        node.config.roadNetwork.nodes.Remove(node);
    }
}