예제 #1
0
    public SpatialHash hash; //hash in which to store this object

    void Start()
    {
        if (hash == null)
        {
            Debug.LogError("Trying to add this object to a null SpatialHash!");
        }
        else
        {
            hash.Include(this.gameObject);
        }
    }
예제 #2
0
    private SpatialHash hash; //hash in which to store this object

    void Start()
    {
        hash = GameObject.Find(hashName).GetComponent <SpatialHash>();

        if (hash == null)
        {
            Debug.LogError("HashObject cannot find SpatialHash by name " + hashName + "!");
        }
        else
        {
            hash.Include(this.gameObject);
        }
    }