add some extra assets FX and SFX
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f49557bd9b919451fb05ad3e9855bce9
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,33 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
|
||||
[CustomEditor(typeof(RampAsset))]
|
||||
public class RampAssetEditor : Editor
|
||||
{
|
||||
public override void OnInspectorGUI()
|
||||
{
|
||||
base.OnInspectorGUI();
|
||||
if (GUILayout.Button("Bake"))
|
||||
Bake();
|
||||
}
|
||||
void Bake()
|
||||
{
|
||||
var r = target as RampAsset;
|
||||
var t = new Texture2D(r.size, r.size, TextureFormat.ARGB32, mipChain: true);
|
||||
var p = t.GetPixels();
|
||||
for (var x = 0; x < r.size; x++)
|
||||
for (var y = 0; y < r.size; y++)
|
||||
p[r.up ? y + (r.size - x - 1) * r.size : x + y * r.size] = r.gradient.Evaluate(x * 1f / r.size);
|
||||
t.SetPixels(p);
|
||||
t.Apply();
|
||||
var bytes = t.EncodeToPNG();
|
||||
var path = AssetDatabase.GetAssetPath(r).Replace(".asset", "") + ".png";
|
||||
if (!r.overwriteExisting)
|
||||
path = AssetDatabase.GenerateUniqueAssetPath(path);
|
||||
System.IO.File.WriteAllBytes(path, bytes);
|
||||
AssetDatabase.Refresh();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0939ef1fe67b3477e8058638b5924ab5
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 127325
|
||||
packageName: Particle Pack
|
||||
packageVersion: 3.1
|
||||
assetPath: Assets/UnityTechnologies/ParticlePack/Shared/Ramps/Editor/RampAssetEditor.cs
|
||||
uploadId: 691001
|
||||
BIN
Assets/UnityTechnologies/ParticlePack/Shared/Ramps/RampBaker.asset
LFS
Normal file
BIN
Assets/UnityTechnologies/ParticlePack/Shared/Ramps/RampBaker.asset
LFS
Normal file
Binary file not shown.
@@ -0,0 +1,15 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6964ca4c5ab465b42a92b518c40c537b
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 127325
|
||||
packageName: Particle Pack
|
||||
packageVersion: 3.1
|
||||
assetPath: Assets/UnityTechnologies/ParticlePack/Shared/Ramps/RampBaker.asset
|
||||
uploadId: 691001
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 043362eb87bb040648a7d956a077ae26
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,13 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
|
||||
[CreateAssetMenu]
|
||||
public class RampAsset : ScriptableObject
|
||||
{
|
||||
public Gradient gradient = new Gradient();
|
||||
public int size = 16;
|
||||
public bool up = false;
|
||||
public bool overwriteExisting = true;
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 366060de70f6d41d688e416621057bb3
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 127325
|
||||
packageName: Particle Pack
|
||||
packageVersion: 3.1
|
||||
assetPath: Assets/UnityTechnologies/ParticlePack/Shared/Ramps/Runtime/RampAsset.cs
|
||||
uploadId: 691001
|
||||
Reference in New Issue
Block a user