예제 #1
0
    static void RemoveGraphCache()
    {
        CustomGraphCache cache = GetGraphCacheSceneObject();

        if (cache != null)
        {
            GameObject.DestroyImmediate(cache.gameObject);
        }

        AssetDatabase.DeleteAsset(GetGraphCachePath());
        AssetDatabase.DeleteAsset(GetGraphCacheCoverPointPath());
    }
예제 #2
0
    /*[MenuItem("Ravenfield Tools/Debug Path")]
     * static void DebugPath() {
     *      Debug.Log("Executable: "+Paths.ExecutablePath(true));
     *      Debug.Log("Data Path: "+Paths.ExecutableDataPath());
     *      Debug.Log("Staging: "+Paths.ExecutableToolsStagingPath());
     *      Debug.Log("Saved Game Path: "+PlayerPrefs.GetString("executable path"));
     * }*/

    static void SetupGraphCache(TextAsset asset, TextAsset coverPointAsset)
    {
        CustomGraphCache cacheComponent = GameObject.FindObjectOfType <CustomGraphCache>();

        if (cacheComponent == null)
        {
            GameObject graphCacheObject = new GameObject("Graph Cache (Automatically Generated)");
            cacheComponent = graphCacheObject.AddComponent <CustomGraphCache>();
        }

        cacheComponent.cache            = asset;
        cacheComponent.cacheCoverPoints = coverPointAsset;
    }