Sitemap
Giorgi Eliozashvili

Giorgi Eliozashvili

Hello, I'm Giorgi. I write about my Unity Game Dev learning journey on Medium. If you visit my blog, I'd appreciate your feedback and corrections.

Unity ScriptableObject

2 min readJul 19, 2026

When you first make a weapon in a shooter game, you usually give it the standard MonoBehaviour script and write everything there: damage, fire rate, ammo, shooting logic, etc. But when you start adding new weapons, lots of data duplication appears. Every prefab holds a copy of the same data. To solve this, Unity has a feature called ScriptableObjects.

According to Unity documentation, this is the official use case of ScriptableObjects:

Saving and storing data during an Editor session

Saving data as an asset in your project to use at runtime

ScriptableObject is an independent container for saving data. Its main difference from the usual MonoBehaviour is that it does not need to be attached to a GameObject in the scene.

Get Giorgi Eliozashvili’s stories in your inbox

Join Medium for free to get updates from this writer.

Let’s see the example of my basic weapon ScriptableObject:

using UnityEngine;

[CreateAssetMenu(fileName = "WeaponSO", menuName = "Scriptable Objects/WeaponsSO")]
public class WeaponSO : ScriptableObject
{
public Weapon WeaponPrefab;
public ParticleSystem HitVFX;

public int Damage;
public float FireRate;
public bool IsAutomatic;
public bool CanZoom;
public float ZoomAmount;
public float ZoomRotationSpeed;
}

ScriptableObject-s are inheriting from ScriptableObject instead of MonoBehaviour.

Let’s break this example down:

1. [CreateAssetMenu] allows us to create a ScriptableObject file in our project's folder.

2. Inside the class, there are no Start() nor Update() methods. Just pure data that you can manipulate through Unity Inspector. And this is how it looks in Inspector:

So you can have separate weapon ScriptableObjects in your project and manipulate them more clearly and easily.

In summary, ScriptableObject is a perfect tool for data management, separating data (ScriptableObject) and logic (MonoBehaviour), making your project cleaner and easily manageable.

--

--

Giorgi Eliozashvili
Giorgi Eliozashvili

Written by Giorgi Eliozashvili

Hello, I'm Giorgi. I write about my Unity Game Dev learning journey on Medium. If you visit my blog, I'd appreciate your feedback and corrections.