using UnityEditor;
using UnityEngine;
///
/// 创建喷漆数据类型
///
public class CreatAssetUtil : ScriptableObject
{
[MenuItem("Assets/Create/CoatPaintSprayUIStepConfig")]
public static void CreateCoatPaintSprayUIStepConfig()
{
CoatPaintSprayUIStepConfig asset = ScriptableObject.CreateInstance
AssetDatabase.CreateAsset(asset, "Assets/[Game]/Resources/MatchData/Config/CoatPaintSprayUIStepConfig.asset");
AssetDatabase.SaveAssets();
EditorUtility.FocusProjectWindow();
Selection.activeObject = asset;
AssetDatabase.Refresh();
}
}
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class CoatPaintSprayUIStepConfig : ScriptableObject
{
public int _CurrentThrough;
public int _CurrentStep = -1;
public int _TotalThrough = 2;
public Sprite _CoatSpraySprite;
public List _SprayThroughTextList = new List();
【创建ScriptableObject数据一些坑】
public int _GunType;
public int _GunAuxiliaryLine;
public List _CoatPaintCompleteSpray;
public List _SprayTime = new List();
public List
public List _OverlappingCollimation;
public List _GunName = new List();
}
类名一定要相同,类一定要单独创建脚本
推荐阅读
- 【C】题目|【C语言】题集 of ⑥
- 游戏|2022年如何学习前端前沿技术,破卷而出()
- 分布式|《Python3网络爬虫开发实战(第二版)》内容介绍
- 机器学习|机器学习Sklearn学习总结
- Python|Python实战(使用线性回归预测房价)
- docker|Docker
- 腾讯|SaaS的收入模型有哪些(终于有人讲明白了)
- python|Python绘制冬奥吉祥物“冰墩墩”
- 大数据|【新书速递】流量运营教科书
- 编程语言|TIOBE 5月编程语言排行(Python再次挤掉Java,夺下榜二!)