Skip to content
Snippets Groups Projects
Select Git revision
  • 200228082e8ef9559affadb235177e768b4e090b
  • master default protected
  • feature/build
  • develop
  • VA_v2022a
  • v2021.a
  • v2020.a
  • v2019.a
  • v2018.b
  • v2017.c
  • v2017.a
  • v2016.a
12 results

VAUDirectivity.cs

Blame
  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    VAUDirectivity.cs 775 B
    using System.Collections;
    using System.Collections.Generic;
    using UnityEngine;
    
    public class VAUDirectivity : MonoBehaviour {
    
        protected int _ID = -1; // Stores the internal id that is assigned by VA
        [Tooltip("Absolute or relative path (relative to Assets folder), also use AddSearchPath for special folders.")]
        public string FilePath = ""; 
        public string Name = ""; // Versatile name for this directivity
    
        public int ID
        {
            get
            {
                return _ID;
            }
        }
        
        void Start ()
        {
            if (FilePath.Length > 0)
                _ID = VAUAdapter.VA.LoadDirectivity(FilePath, Name);
    	}
    
        private void OnDestroy()
        {
            if (_ID != -1)
                VAUAdapter.VA.FreeDirectivity(_ID);
            _ID = -1;
        }
    }