Skip to content

Commit

Permalink
Added FractureDemo, fixed custom property drawers not being used
Browse files Browse the repository at this point in the history
  • Loading branch information
dgreenheck committed Dec 24, 2021
1 parent cc7ddfe commit ca3b1a8
Show file tree
Hide file tree
Showing 43 changed files with 2,456 additions and 1,893 deletions.
53 changes: 53 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Unity Editor",
"type": "unity",
"request": "launch"
},
{
"name": "Windows Player",
"type": "unity",
"request": "launch"
},
{
"name": "OSX Player",
"type": "unity",
"request": "launch"
},
{
"name": "Linux Player",
"type": "unity",
"request": "launch"
},
{
"name": "iOS Player",
"type": "unity",
"request": "launch"
},
{
"name": "Android Player",
"type": "unity",
"request": "launch"
},
{
"name": "Xbox One Player",
"type": "unity",
"request": "launch"
},
{
"name": "PS4 Player",
"type": "unity",
"request": "launch"
},
{
"name": "SwitchPlayer",
"type": "unity",
"request": "launch"
}
]
}
56 changes: 56 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{
"files.exclude":
{
"**/.DS_Store":true,
"**/.git":true,
"**/.gitignore":true,
"**/.gitmodules":true,
"**/*.booproj":true,
"**/*.pidb":true,
"**/*.suo":true,
"**/*.user":true,
"**/*.userprefs":true,
"**/*.unityproj":true,
"**/*.dll":true,
"**/*.exe":true,
"**/*.pdf":true,
"**/*.mid":true,
"**/*.midi":true,
"**/*.wav":true,
"**/*.gif":true,
"**/*.ico":true,
"**/*.jpg":true,
"**/*.jpeg":true,
"**/*.png":true,
"**/*.psd":true,
"**/*.tga":true,
"**/*.tif":true,
"**/*.tiff":true,
"**/*.3ds":true,
"**/*.3DS":true,
"**/*.fbx":true,
"**/*.FBX":true,
"**/*.lxo":true,
"**/*.LXO":true,
"**/*.ma":true,
"**/*.MA":true,
"**/*.obj":true,
"**/*.OBJ":true,
"**/*.asset":true,
"**/*.cubemap":true,
"**/*.flare":true,
"**/*.mat":true,
"**/*.meta":true,
"**/*.prefab":true,
"**/*.unity":true,
"build/":true,
"Build/":true,
"Library/":true,
"library/":true,
"obj/":true,
"Obj/":true,
"ProjectSettings/":true,
"temp/":true,
"Temp/":true
}
}
7 changes: 7 additions & 0 deletions Editor/FractureEditor.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
using UnityEditor;

[CustomEditor(typeof(Fracture))]
public class FractureEditor : Editor
{
// Empty editor required for custom property drawers to work properly
}
11 changes: 11 additions & 0 deletions Editor/FractureEditor.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 18 additions & 0 deletions Editor/OpenFracture.Editor.asmdef
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"name": "OpenFracture.Editor",
"rootNamespace": "",
"references": [
"GUID:7b1a8d9f4355a214f9a95471fa510c86"
],
"includePlatforms": [
"Editor"
],
"excludePlatforms": [],
"allowUnsafeCode": false,
"overrideReferences": false,
"precompiledReferences": [],
"autoReferenced": true,
"defineConstraints": [],
"versionDefines": [],
"noEngineReferences": false
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions Editor/PrefractureEditor.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
using UnityEditor;

[CustomEditor(typeof(Prefracture))]
public class PreractureEditor : Editor
{
// Empty editor required for custom property drawers to work properly
}
11 changes: 11 additions & 0 deletions Editor/PrefractureEditor.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Editor/RefractureOptionsPropertyDrawer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
[CustomPropertyDrawer(typeof(RefractureOptions))]
public class RefractureOptionsPropertyDrawer : PropertyDrawer
{
private static bool foldout = false;
private static bool foldout = true;

// Draw the property inside the given rect
public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
Expand Down
7 changes: 7 additions & 0 deletions Editor/SliceEditor.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
using UnityEditor;

[CustomEditor(typeof(SliceEditor))]
public class SliceEditor : Editor
{
// Empty editor required for custom property drawers to work properly
}
11 changes: 11 additions & 0 deletions Editor/SliceEditor.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Editor/TriggerOptionsPropertyDrawer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ public override void OnGUI(Rect position, SerializedProperty property, GUIConten
{
case ((int)TriggerType.Collision):
EditorGUILayout.PropertyField(minimumCollisionForce);
EditorGUILayout.PropertyField(filterCollisionsByTag);
EditorGUILayout.PropertyField(filterCollisionsByTag, new GUIContent("Limit collisions to selected tags?"));
if (filterCollisionsByTag.boolValue)
{
EditorGUILayout.EndFoldoutHeaderGroup();
EditorGUILayout.PropertyField(triggerAllowedTags);
EditorGUILayout.PropertyField(triggerAllowedTags, new GUIContent("Included Tags"));
}
break;
case ((int)TriggerType.Trigger):
Expand Down
Binary file modified Runtime/Audio/rocks.mp3
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ PhysicMaterial:
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: SlicedObject
m_Name: Default
dynamicFriction: 0.12
staticFriction: 0.3
bounciness: 0.1
bounciness: 0.8
frictionCombine: 2
bounceCombine: 2
6 changes: 3 additions & 3 deletions Runtime/Materials/Blue.mat → Runtime/Materials/Inside.mat
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Material:
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Blue
m_Name: Inside
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
m_ShaderKeywords:
m_LightmapFlags: 4
Expand All @@ -34,7 +34,7 @@ Material:
serializedVersion: 3
m_TexEnvs:
- _BaseMap:
m_Texture: {fileID: 0}
m_Texture: {fileID: 10309, guid: 0000000000000000f000000000000000, type: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BumpMap:
Expand All @@ -58,7 +58,7 @@ Material:
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 0}
m_Texture: {fileID: 10309, guid: 0000000000000000f000000000000000, type: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
Expand Down
File renamed without changes.
6 changes: 3 additions & 3 deletions Runtime/Materials/Red.mat → Runtime/Materials/Outside.mat
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Material:
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Red
m_Name: Outside
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
m_ShaderKeywords:
m_LightmapFlags: 4
Expand All @@ -34,7 +34,7 @@ Material:
serializedVersion: 3
m_TexEnvs:
- _BaseMap:
m_Texture: {fileID: 0}
m_Texture: {fileID: 10309, guid: 0000000000000000f000000000000000, type: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BumpMap:
Expand All @@ -58,7 +58,7 @@ Material:
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 0}
m_Texture: {fileID: 10309, guid: 0000000000000000f000000000000000, type: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion Runtime/Materials/Projectile.physicMaterial
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ PhysicMaterial:
m_Name: Projectile
dynamicFriction: 0.6
staticFriction: 0.6
bounciness: 0.8
bounciness: 1
frictionCombine: 0
bounceCombine: 0
Binary file removed Runtime/Meshes/horse_statue_01_1k.blend
Binary file not shown.
102 changes: 0 additions & 102 deletions Runtime/Meshes/horse_statue_01_1k.blend.meta

This file was deleted.

Binary file removed Runtime/Meshes/horse_statue_01_1k.blend1
Binary file not shown.
Loading

0 comments on commit ca3b1a8

Please sign in to comment.