add some extra assets FX and SFX
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
using UnityEngine;
|
||||
using System.Collections;
|
||||
using UnityEditor;
|
||||
using EzySlice;
|
||||
|
||||
/**
|
||||
* This is a simple Editor helper script for rapid testing/prototyping!
|
||||
*/
|
||||
[CustomEditor(typeof(ShatterExample))]
|
||||
public class ShatterExampleEditor : Editor {
|
||||
public GameObject source;
|
||||
public Material crossMat;
|
||||
public int slice;
|
||||
|
||||
public override void OnInspectorGUI() {
|
||||
ShatterExample plane = (ShatterExample)target;
|
||||
|
||||
source = (GameObject)EditorGUILayout.ObjectField(source, typeof(GameObject), true);
|
||||
|
||||
if (source == null) {
|
||||
EditorGUILayout.LabelField("Add a GameObject to Shatter.");
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (!source.activeInHierarchy) {
|
||||
EditorGUILayout.LabelField("Object is Hidden. Cannot Slice.");
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (source.GetComponent<MeshFilter>() == null) {
|
||||
EditorGUILayout.LabelField("GameObject must have a MeshFilter.");
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
crossMat = (Material)EditorGUILayout.ObjectField(crossMat, typeof(Material), true);
|
||||
slice = EditorGUILayout.IntSlider(slice, 1, 20);
|
||||
|
||||
if (GUILayout.Button("Shatter Object")) {
|
||||
if (plane.ShatterObject(source, slice, crossMat)) {
|
||||
source.SetActive(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d0bc9b3efbea340c0ae2cb00d46f9a2c
|
||||
timeCreated: 1521778957
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 40995
|
||||
packageName: Game Kit Controller - Shooter Melee Adventure FPS TPS Creator 3D +
|
||||
2.5D
|
||||
packageVersion: 3.77h
|
||||
assetPath: Assets/Game Kit Controller/Integrations/EzySlice/Scripts/Editor/ShatterExampleEditor.cs
|
||||
uploadId: 889948
|
||||
Reference in New Issue
Block a user