Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

unity scriptable object

[CreateAssetMenu(fileName = "Data", menuName = "ScriptableObjects/SpawnManagerScriptableObject", order = 1)]
public class SpawnManagerScriptableObject : ScriptableObject
{
    public string prefabName;

    public int numberOfPrefabsToCreate;
    public Vector3[] spawnPoints;
}
Comment

scriptable object guid unity

using UnityEngine;

public class SerializableScriptableObject : ScriptableObject
{
    [SerializeField] Guid _guid;
    public Guid Guid => _guid;

    void OnValidate()
    {
#if UNITY_EDITOR // UnityEditor namespace is not available in Release/Builds
        var path = UnityEditor.AssetDatabase.GetAssetPath(this);
        _guid = new Guid(UnityEditor.AssetDatabase.AssetPathToGUID(path));
#endif
    }
}
Comment

PREVIOUS NEXT
Code Example
Csharp :: get path c# 
Csharp :: c# list object to json 
Csharp :: check animation end unity 
Csharp :: how o remove .meta files visual studio code 
Csharp :: check if gameobject exists unity 
Csharp :: email regex c# 
Csharp :: c# format decimal as currency 
Csharp :: how to make c# program run cmd commands 
Csharp :: insert variables into string c# 
Csharp :: get dropdown selected value unity 
Csharp :: unity movetowards 2d 
Csharp :: how to write blank lines in c#.net 
Csharp :: unity flexiable space 
Csharp :: how to change rotate with script unity 
Csharp :: unity convert mouse position to world position in editor mode 
Csharp :: set active text unity 
Csharp :: xml node update attribute value c# 
Csharp :: Base64String to stream c# 
Csharp :: C# infinite clock coroutine loop 
Csharp :: remove end character of string c# 
Csharp :: C# multiple button click event to password textbox 
Csharp :: c# shuffle string array 
Csharp :: how to compare 2 date time in asp.net core 3.1 
Csharp :: c# add 1 
Csharp :: avoid autocomplete input text asp.net 
Csharp :: convert int to string in linq query c# 
Csharp :: nginx listen on 80 and 443 
Csharp :: unity mouse movement 
Csharp :: destroy gameobject unity 
Csharp :: c# @ before string 
ADD CONTENT
Topic
Content
Source link
Name
9+8 =