Basically the way I have things set up currently will make the scriptable object pop up all the other options. I’m a 3D artist and not a programmer, but ive done my best over the last month to learn what I could. Its likely just a easy fix on how I coded the system (its obviously in very early stages). Basically I made different types for the system and I dont want nor need them all selected or active per different type.
Image (Top) is the current predicament
Image (Bottom) is what im trying to achieve with notations.
Here’s the foundation im building on :
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public enum ItemType // ITEM PIPELINE FOUNDATION
{
Weapon,
Attachment,
Equipment,
Consumable,
Default
}
public enum AttachmentType // ATTACHMENTS
{
Laser,
Flashlight,
Grip,
Slide,
Barrel,
Suppressor,
Magazine,
Stock,
}
public enum DefaultType // STATIC ITEMS
{
Quest,
Valuable
}
public enum ConsumableType // CONSUMABLES
{
Food,
Health,
Ammunition
}
public enum WeaponType // WEAPONS
{
Primary,
Secondary,
Melee,
Throwable
}
public abstract class ItemObject : ScriptableObject
{
public GameObject prefab;
public ItemType type;
public WeaponType weaponType;
public ConsumableType consumableType;
public AttachmentType attachmentType;
public DefaultType defaultType;
[TextArea(15, 20)]
public string description;
}
Here’s one of the individual Scripts for type :
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
[CreateAssetMenu(fileName = "New Health Item", menuName = "Inventory System/Items/Consumable/Health")]
public class Health : ItemObject
{
public float healthEffect;
public bool canStopBleeds;
public void Awake()
{
type = ItemType.Consumable;
consumableType = ConsumableType.Health;
}
}
Thank you to anyone willing to help. I’m sure its a simple fix, I just haven’t been able to find it yet.
