├── .gitattributes ├── PhysSound_2.6.0_Beta └── Assets │ └── PhysSound │ ├── Demo │ ├── DropObject.cs │ ├── DropObject.cs.meta │ ├── Materials │ │ ├── Mat_Green.mat │ │ ├── Mat_Green.mat.meta │ │ ├── Mat_Grey.mat │ │ ├── Mat_Grey.mat.meta │ │ ├── Mat_Hard.mat │ │ ├── Mat_Hard.mat.meta │ │ ├── Mat_Orange.mat │ │ ├── Mat_Orange.mat.meta │ │ ├── Mat_Pink.mat │ │ ├── Mat_Pink.mat.meta │ │ ├── Mat_Red.mat │ │ ├── Mat_Red.mat.meta │ │ ├── Mat_Soft.mat │ │ └── Mat_Soft.mat.meta │ ├── PhysSound Demo.unity │ ├── PhysSound Demo.unity.meta │ ├── PhysSound Materials │ │ ├── Basketball.asset │ │ ├── Basketball.asset.meta │ │ ├── Brick.asset │ │ ├── Brick.asset.meta │ │ ├── Ground_Hard.asset │ │ ├── Ground_Hard.asset.meta │ │ ├── Ground_Other.asset │ │ ├── Ground_Other.asset.meta │ │ ├── Ground_Soft.asset │ │ ├── Ground_Soft.asset.meta │ │ ├── Metal.asset │ │ ├── Metal.asset.meta │ │ ├── Plastic.asset │ │ ├── Plastic.asset.meta │ │ ├── Rock.asset │ │ └── Rock.asset.meta │ ├── Prefabs │ │ ├── Audio Source Prefab (For Audio Pool).prefab │ │ ├── Audio Source Prefab (For Audio Pool).prefab.meta │ │ ├── Basketball Sphere.prefab │ │ ├── Basketball Sphere.prefab.meta │ │ ├── Basketball.physicmaterial │ │ ├── Basketball.physicmaterial.meta │ │ ├── Brick Cube.prefab │ │ ├── Brick Cube.prefab.meta │ │ ├── Brick.physicmaterial │ │ ├── Brick.physicmaterial.meta │ │ ├── Ground_Hard.physicmaterial │ │ ├── Ground_Hard.physicmaterial.meta │ │ ├── Ground_Soft.physicmaterial │ │ ├── Ground_Soft.physicmaterial.meta │ │ ├── Metal Sphere.prefab │ │ ├── Metal Sphere.prefab.meta │ │ ├── Metal.physicmaterial │ │ ├── Metal.physicmaterial.meta │ │ ├── Plastic Cube.prefab │ │ ├── Plastic Cube.prefab.meta │ │ ├── Plastic.physicmaterial │ │ ├── Plastic.physicmaterial.meta │ │ ├── Rock Cube.prefab │ │ └── Rock Cube.prefab.meta │ └── Sounds │ │ ├── Basketball │ │ ├── basketball_hard_0.wav │ │ ├── basketball_hard_0.wav.meta │ │ ├── basketball_hard_1.wav │ │ ├── basketball_hard_1.wav.meta │ │ ├── basketball_hard_2.wav │ │ ├── basketball_hard_2.wav.meta │ │ ├── basketball_hard_3.wav │ │ ├── basketball_hard_3.wav.meta │ │ ├── basketball_soft_0.wav │ │ ├── basketball_soft_0.wav.meta │ │ ├── basketball_soft_1.wav │ │ ├── basketball_soft_1.wav.meta │ │ ├── basketball_soft_2.wav │ │ ├── basketball_soft_2.wav.meta │ │ ├── basketball_soft_3.wav │ │ └── basketball_soft_3.wav.meta │ │ ├── Brick │ │ ├── brick_hit_0.wav │ │ ├── brick_hit_0.wav.meta │ │ ├── brick_hit_1.wav │ │ ├── brick_hit_1.wav.meta │ │ ├── brick_hit_2.wav │ │ ├── brick_hit_2.wav.meta │ │ ├── brick_hit_3.wav │ │ ├── brick_hit_3.wav.meta │ │ ├── brick_hit_soft_0.wav │ │ ├── brick_hit_soft_0.wav.meta │ │ ├── brick_hit_soft_1.wav │ │ ├── brick_hit_soft_1.wav.meta │ │ ├── brick_hit_soft_2.wav │ │ ├── brick_hit_soft_2.wav.meta │ │ ├── brick_hit_soft_3.wav │ │ └── brick_hit_soft_3.wav.meta │ │ ├── Metal │ │ ├── metal_pot_hit_0.wav │ │ ├── metal_pot_hit_0.wav.meta │ │ ├── metal_pot_hit_1.wav │ │ ├── metal_pot_hit_1.wav.meta │ │ ├── metal_pot_hit_2.wav │ │ ├── metal_pot_hit_2.wav.meta │ │ ├── metal_pot_hit_3.wav │ │ ├── metal_pot_hit_3.wav.meta │ │ ├── metal_pot_soft_hit_0.wav │ │ ├── metal_pot_soft_hit_0.wav.meta │ │ ├── metal_pot_soft_hit_1.wav │ │ ├── metal_pot_soft_hit_1.wav.meta │ │ ├── metal_pot_soft_hit_2.wav │ │ ├── metal_pot_soft_hit_2.wav.meta │ │ ├── metal_pot_soft_hit_3.wav │ │ ├── metal_pot_soft_hit_3.wav.meta │ │ ├── metal_slide_hard.wav │ │ └── metal_slide_hard.wav.meta │ │ ├── Rock │ │ ├── rock_small_hit_0.wav │ │ ├── rock_small_hit_0.wav.meta │ │ ├── rock_small_hit_1.wav │ │ ├── rock_small_hit_1.wav.meta │ │ ├── rock_small_hit_2.wav │ │ ├── rock_small_hit_2.wav.meta │ │ ├── rock_small_hit_3.wav │ │ └── rock_small_hit_3.wav.meta │ │ └── Thick Plastic │ │ ├── thick_plastic_hard_0.wav │ │ ├── thick_plastic_hard_0.wav.meta │ │ ├── thick_plastic_hard_1.wav │ │ ├── thick_plastic_hard_1.wav.meta │ │ ├── thick_plastic_hard_2.wav │ │ ├── thick_plastic_hard_2.wav.meta │ │ ├── thick_plastic_hard_3.wav │ │ ├── thick_plastic_hard_3.wav.meta │ │ ├── thick_plastic_hard_4.wav │ │ ├── thick_plastic_hard_4.wav.meta │ │ ├── thick_plastic_slide_hard.wav │ │ ├── thick_plastic_slide_hard.wav.meta │ │ ├── thick_plastic_slide_soft.wav │ │ ├── thick_plastic_slide_soft.wav.meta │ │ ├── thick_plastic_soft_0.wav │ │ ├── thick_plastic_soft_0.wav.meta │ │ ├── thick_plastic_soft_1.wav │ │ ├── thick_plastic_soft_1.wav.meta │ │ ├── thick_plastic_soft_2.wav │ │ ├── thick_plastic_soft_2.wav.meta │ │ ├── thick_plastic_soft_3.wav │ │ └── thick_plastic_soft_3.wav.meta │ ├── Docs │ ├── PhysSound Guide & Docs.pdf │ └── PhysSound Guide & Docs.pdf.meta │ └── Scripts │ ├── Editor │ ├── CreatePhysSoundMaterial.cs │ ├── CreatePhysSoundMaterial.cs.meta │ ├── PhysSoundMaterialEditor.cs │ ├── PhysSoundMaterialEditor.cs.meta │ ├── PhysSoundObjectEditor.cs │ ├── PhysSoundObjectEditor.cs.meta │ ├── PhysSoundObjectLiteEditor.cs │ ├── PhysSoundObjectLiteEditor.cs.meta │ ├── PhysSoundTerrainEditor.cs │ ├── PhysSoundTerrainEditor.cs.meta │ ├── PhysSoundTypeEditor.cs │ └── PhysSoundTypeEditor.cs.meta │ ├── PhysSoundBase.cs │ ├── PhysSoundBase.cs.meta │ ├── PhysSoundMaterial.cs │ ├── PhysSoundMaterial.cs.meta │ ├── PhysSoundObject.cs │ ├── PhysSoundObject.cs.meta │ ├── PhysSoundObjectBase.cs │ ├── PhysSoundObjectBase.cs.meta │ ├── PhysSoundObjectLite.cs │ ├── PhysSoundObjectLite.cs.meta │ ├── PhysSoundTempAudio.cs │ ├── PhysSoundTempAudio.cs.meta │ ├── PhysSoundTempAudioPool.cs │ ├── PhysSoundTempAudioPool.cs.meta │ ├── PhysSoundTerrain.cs │ ├── PhysSoundTerrain.cs.meta │ ├── PhysSoundTypeList.cs │ ├── PhysSoundTypeList.cs.meta │ └── Utilities │ ├── FoldoutList.cs │ ├── FoldoutList.cs.meta │ ├── Range.cs │ └── Range.cs.meta ├── README.md └── license.txt /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/DropObject.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections; 3 | 4 | public class DropObject : MonoBehaviour 5 | { 6 | public GameObject[] Objects; 7 | 8 | public Transform DropLocation; 9 | public float RandomForce; 10 | 11 | void Start() 12 | { 13 | foreach(GameObject g in Objects) 14 | g.GetComponent().maxAngularVelocity = 1000; 15 | 16 | drop(-1); 17 | } 18 | 19 | void Update() 20 | { 21 | if (Input.GetKeyDown(KeyCode.Q)) 22 | { 23 | drop(-1); 24 | } 25 | 26 | if (Input.GetKeyDown(KeyCode.Alpha1)) 27 | drop(0); 28 | if (Input.GetKeyDown(KeyCode.Alpha2)) 29 | drop(1); 30 | if (Input.GetKeyDown(KeyCode.Alpha3)) 31 | drop(2); 32 | if (Input.GetKeyDown(KeyCode.Alpha4)) 33 | drop(3); 34 | if (Input.GetKeyDown(KeyCode.Alpha5)) 35 | drop(4); 36 | } 37 | 38 | void drop(int obj) 39 | { 40 | for (int i = 0; i < Objects.Length; i++) 41 | { 42 | if (obj == -1 || i == obj) 43 | { 44 | GameObject g = Objects[i]; 45 | g.transform.position = DropLocation.position + Random.insideUnitSphere * 1.5f; 46 | g.GetComponent().velocity = new Vector3(Random.Range(-RandomForce, RandomForce), Random.Range(-RandomForce, RandomForce), 0); 47 | g.GetComponent().angularVelocity = Random.insideUnitSphere * RandomForce; 48 | } 49 | } 50 | } 51 | 52 | void OnGUI() 53 | { 54 | GUILayout.BeginArea(new Rect(10, 10, Screen.width - 20, 50)); 55 | GUILayout.BeginHorizontal(); 56 | GUILayout.FlexibleSpace(); 57 | GUILayout.Box(Application.loadedLevelName); 58 | GUILayout.Box("Press 'Q' to drop objects."); 59 | GUILayout.Box("Press '1', '2', '3', '4', or '5' to drop specific objects."); 60 | //GUILayout.Box("Current Object: " + Target.name); 61 | //GUILayout.Box("'1' '2' '3' or '4' to load different scenes."); 62 | GUILayout.FlexibleSpace(); 63 | GUILayout.EndHorizontal(); 64 | GUILayout.EndArea(); 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/DropObject.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2f72b921183954c41b6ac01ceac16ccc 3 | labels: 4 | - Physics 5 | - Sound 6 | - Audio 7 | - Impact 8 | timeCreated: 1431318388 9 | licenseType: Free 10 | MonoImporter: 11 | serializedVersion: 2 12 | defaultReferences: [] 13 | executionOrder: 0 14 | icon: {instanceID: 0} 15 | userData: 16 | assetBundleName: 17 | assetBundleVariant: 18 | -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Materials/Mat_Green.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScruffyRules/PhysSound-Open-Source/1a566879e40f4a1cb4d5a763d8ed649110524949/PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Materials/Mat_Green.mat -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Materials/Mat_Green.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c21e10a0ceb7c9d419a24c5a7a294491 3 | labels: 4 | - Physics 5 | - Sound 6 | - Audio 7 | - Impact 8 | timeCreated: 1454450944 9 | licenseType: Free 10 | NativeFormatImporter: 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Materials/Mat_Grey.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScruffyRules/PhysSound-Open-Source/1a566879e40f4a1cb4d5a763d8ed649110524949/PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Materials/Mat_Grey.mat -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Materials/Mat_Grey.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 93939afa1cbabdb498f30fb8b7da4592 3 | labels: 4 | - Physics 5 | - Sound 6 | - Audio 7 | - Impact 8 | timeCreated: 1454451542 9 | licenseType: Free 10 | NativeFormatImporter: 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Materials/Mat_Hard.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScruffyRules/PhysSound-Open-Source/1a566879e40f4a1cb4d5a763d8ed649110524949/PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Materials/Mat_Hard.mat -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Materials/Mat_Hard.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0c31a13c15798d94aac153097f821cd2 3 | labels: 4 | - Physics 5 | - Sound 6 | - Audio 7 | - Impact 8 | timeCreated: 1431307640 9 | licenseType: Free 10 | NativeFormatImporter: 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Materials/Mat_Orange.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScruffyRules/PhysSound-Open-Source/1a566879e40f4a1cb4d5a763d8ed649110524949/PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Materials/Mat_Orange.mat -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Materials/Mat_Orange.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 23ae4d21aaedad74d9233241c9411ec6 3 | labels: 4 | - Physics 5 | - Sound 6 | - Audio 7 | - Impact 8 | timeCreated: 1454449840 9 | licenseType: Free 10 | NativeFormatImporter: 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Materials/Mat_Pink.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScruffyRules/PhysSound-Open-Source/1a566879e40f4a1cb4d5a763d8ed649110524949/PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Materials/Mat_Pink.mat -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Materials/Mat_Pink.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 71b2d33b531c8fd4ba606bd1b6323a78 3 | labels: 4 | - Physics 5 | - Sound 6 | - Audio 7 | - Impact 8 | timeCreated: 1454450553 9 | licenseType: Free 10 | NativeFormatImporter: 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Materials/Mat_Red.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScruffyRules/PhysSound-Open-Source/1a566879e40f4a1cb4d5a763d8ed649110524949/PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Materials/Mat_Red.mat -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Materials/Mat_Red.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e3fd64d5e2ad635468e8104dd9f7ec2f 3 | labels: 4 | - Physics 5 | - Sound 6 | - Audio 7 | - Impact 8 | timeCreated: 1431285562 9 | licenseType: Free 10 | NativeFormatImporter: 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Materials/Mat_Soft.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScruffyRules/PhysSound-Open-Source/1a566879e40f4a1cb4d5a763d8ed649110524949/PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Materials/Mat_Soft.mat -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Materials/Mat_Soft.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 911a10cbaefb55248a823c7461002714 3 | labels: 4 | - Physics 5 | - Sound 6 | - Audio 7 | - Impact 8 | timeCreated: 1431295840 9 | licenseType: Free 10 | NativeFormatImporter: 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/PhysSound Demo.unity: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScruffyRules/PhysSound-Open-Source/1a566879e40f4a1cb4d5a763d8ed649110524949/PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/PhysSound Demo.unity -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/PhysSound Demo.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f844d0d6aec23a243abd2ac9ee2c77ec 3 | labels: 4 | - Physics 5 | - Sound 6 | - Audio 7 | - Impact 8 | timeCreated: 1431318285 9 | licenseType: Free 10 | DefaultImporter: 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/PhysSound Materials/Basketball.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScruffyRules/PhysSound-Open-Source/1a566879e40f4a1cb4d5a763d8ed649110524949/PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/PhysSound Materials/Basketball.asset -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/PhysSound Materials/Basketball.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a59d9ac9ac2b53043b7d54871ae2e06f 3 | labels: 4 | - Physics 5 | - Sound 6 | - Audio 7 | - Impact 8 | timeCreated: 1454449872 9 | licenseType: Free 10 | NativeFormatImporter: 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/PhysSound Materials/Brick.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScruffyRules/PhysSound-Open-Source/1a566879e40f4a1cb4d5a763d8ed649110524949/PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/PhysSound Materials/Brick.asset -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/PhysSound Materials/Brick.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6b8a72627fc65c341885a56706edd829 3 | labels: 4 | - Physics 5 | - Sound 6 | - Audio 7 | - Impact 8 | timeCreated: 1454449643 9 | licenseType: Free 10 | NativeFormatImporter: 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/PhysSound Materials/Ground_Hard.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScruffyRules/PhysSound-Open-Source/1a566879e40f4a1cb4d5a763d8ed649110524949/PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/PhysSound Materials/Ground_Hard.asset -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/PhysSound Materials/Ground_Hard.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: dc6cf0b37012d484893a37dfc27170e9 3 | labels: 4 | - Physics 5 | - Sound 6 | - Audio 7 | - Impact 8 | timeCreated: 1431307853 9 | licenseType: Free 10 | NativeFormatImporter: 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/PhysSound Materials/Ground_Other.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScruffyRules/PhysSound-Open-Source/1a566879e40f4a1cb4d5a763d8ed649110524949/PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/PhysSound Materials/Ground_Other.asset -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/PhysSound Materials/Ground_Other.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a164cdb3838286449af1a88c75896674 3 | labels: 4 | - Physics 5 | - Sound 6 | - Audio 7 | - Impact 8 | timeCreated: 1434998193 9 | licenseType: Free 10 | NativeFormatImporter: 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/PhysSound Materials/Ground_Soft.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScruffyRules/PhysSound-Open-Source/1a566879e40f4a1cb4d5a763d8ed649110524949/PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/PhysSound Materials/Ground_Soft.asset -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/PhysSound Materials/Ground_Soft.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4312855ac381b914f9558f9b42c69504 3 | labels: 4 | - Physics 5 | - Sound 6 | - Audio 7 | - Impact 8 | timeCreated: 1431307844 9 | licenseType: Free 10 | NativeFormatImporter: 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/PhysSound Materials/Metal.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScruffyRules/PhysSound-Open-Source/1a566879e40f4a1cb4d5a763d8ed649110524949/PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/PhysSound Materials/Metal.asset -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/PhysSound Materials/Metal.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1e71e50ad3547284f9237aa2fc872b9a 3 | labels: 4 | - Physics 5 | - Sound 6 | - Audio 7 | - Impact 8 | timeCreated: 1454450986 9 | licenseType: Free 10 | NativeFormatImporter: 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/PhysSound Materials/Plastic.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScruffyRules/PhysSound-Open-Source/1a566879e40f4a1cb4d5a763d8ed649110524949/PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/PhysSound Materials/Plastic.asset -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/PhysSound Materials/Plastic.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0e0e518e4d00b3448bf0fc5509ab493f 3 | labels: 4 | - Physics 5 | - Sound 6 | - Audio 7 | - Impact 8 | timeCreated: 1431322271 9 | licenseType: Free 10 | NativeFormatImporter: 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/PhysSound Materials/Rock.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScruffyRules/PhysSound-Open-Source/1a566879e40f4a1cb4d5a763d8ed649110524949/PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/PhysSound Materials/Rock.asset -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/PhysSound Materials/Rock.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c995e6614677d594691c76fafdd6ca2a 3 | labels: 4 | - Physics 5 | - Sound 6 | - Audio 7 | - Impact 8 | timeCreated: 1454451571 9 | licenseType: Free 10 | NativeFormatImporter: 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Prefabs/Audio Source Prefab (For Audio Pool).prefab: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScruffyRules/PhysSound-Open-Source/1a566879e40f4a1cb4d5a763d8ed649110524949/PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Prefabs/Audio Source Prefab (For Audio Pool).prefab -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Prefabs/Audio Source Prefab (For Audio Pool).prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bdac02d039e6c2f4dae6e3e57d2da17d 3 | timeCreated: 1466460339 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Prefabs/Basketball Sphere.prefab: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScruffyRules/PhysSound-Open-Source/1a566879e40f4a1cb4d5a763d8ed649110524949/PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Prefabs/Basketball Sphere.prefab -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Prefabs/Basketball Sphere.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 07842165f0453464aab2d1894d79deca 3 | timeCreated: 1454449929 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Prefabs/Basketball.physicmaterial: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScruffyRules/PhysSound-Open-Source/1a566879e40f4a1cb4d5a763d8ed649110524949/PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Prefabs/Basketball.physicmaterial -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Prefabs/Basketball.physicmaterial.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6782dcc302077e24f814003b9956fd5f 3 | labels: 4 | - Physics 5 | - Sound 6 | - Audio 7 | - Impact 8 | timeCreated: 1454449944 9 | licenseType: Free 10 | NativeFormatImporter: 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Prefabs/Brick Cube.prefab: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScruffyRules/PhysSound-Open-Source/1a566879e40f4a1cb4d5a763d8ed649110524949/PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Prefabs/Brick Cube.prefab -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Prefabs/Brick Cube.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 93ae0b59410fee64abe696fe568cc558 3 | timeCreated: 1454449719 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Prefabs/Brick.physicmaterial: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScruffyRules/PhysSound-Open-Source/1a566879e40f4a1cb4d5a763d8ed649110524949/PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Prefabs/Brick.physicmaterial -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Prefabs/Brick.physicmaterial.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 51b1186b78d34404cb8f8b26c18eb35d 3 | labels: 4 | - Physics 5 | - Sound 6 | - Audio 7 | - Impact 8 | timeCreated: 1455575044 9 | licenseType: Free 10 | NativeFormatImporter: 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Prefabs/Ground_Hard.physicmaterial: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScruffyRules/PhysSound-Open-Source/1a566879e40f4a1cb4d5a763d8ed649110524949/PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Prefabs/Ground_Hard.physicmaterial -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Prefabs/Ground_Hard.physicmaterial.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a7af3440b48952d4c9add9b8bbd05fdf 3 | labels: 4 | - Physics 5 | - Sound 6 | - Audio 7 | - Impact 8 | timeCreated: 1455574837 9 | licenseType: Free 10 | NativeFormatImporter: 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Prefabs/Ground_Soft.physicmaterial: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScruffyRules/PhysSound-Open-Source/1a566879e40f4a1cb4d5a763d8ed649110524949/PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Prefabs/Ground_Soft.physicmaterial -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Prefabs/Ground_Soft.physicmaterial.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: dae91f503d4b06f45962baeefd994352 3 | labels: 4 | - Physics 5 | - Sound 6 | - Audio 7 | - Impact 8 | timeCreated: 1455574858 9 | licenseType: Free 10 | NativeFormatImporter: 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Prefabs/Metal Sphere.prefab: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScruffyRules/PhysSound-Open-Source/1a566879e40f4a1cb4d5a763d8ed649110524949/PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Prefabs/Metal Sphere.prefab -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Prefabs/Metal Sphere.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4ef586fd4e4d3f14a93850ef81ab965d 3 | timeCreated: 1454450974 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Prefabs/Metal.physicmaterial: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScruffyRules/PhysSound-Open-Source/1a566879e40f4a1cb4d5a763d8ed649110524949/PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Prefabs/Metal.physicmaterial -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Prefabs/Metal.physicmaterial.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 94dc3627b2a5424468fd0a29a45eccb3 3 | labels: 4 | - Physics 5 | - Sound 6 | - Audio 7 | - Impact 8 | timeCreated: 1455574890 9 | licenseType: Free 10 | NativeFormatImporter: 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Prefabs/Plastic Cube.prefab: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScruffyRules/PhysSound-Open-Source/1a566879e40f4a1cb4d5a763d8ed649110524949/PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Prefabs/Plastic Cube.prefab -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Prefabs/Plastic Cube.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7b1edfa54a30cc14c80480c6c21ab6af 3 | labels: 4 | - Physics 5 | - Sound 6 | - Audio 7 | - Impact 8 | timeCreated: 1431324553 9 | licenseType: Free 10 | NativeFormatImporter: 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Prefabs/Plastic.physicmaterial: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScruffyRules/PhysSound-Open-Source/1a566879e40f4a1cb4d5a763d8ed649110524949/PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Prefabs/Plastic.physicmaterial -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Prefabs/Plastic.physicmaterial.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 880bbe89bb329404bbfd54395efe5fc9 3 | labels: 4 | - Physics 5 | - Sound 6 | - Audio 7 | - Impact 8 | timeCreated: 1431324987 9 | licenseType: Free 10 | NativeFormatImporter: 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Prefabs/Rock Cube.prefab: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScruffyRules/PhysSound-Open-Source/1a566879e40f4a1cb4d5a763d8ed649110524949/PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Prefabs/Rock Cube.prefab -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Prefabs/Rock Cube.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: dc381ff9aee31ba4485b519cd21cd0bb 3 | timeCreated: 1454451598 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Sounds/Basketball/basketball_hard_0.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScruffyRules/PhysSound-Open-Source/1a566879e40f4a1cb4d5a763d8ed649110524949/PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Sounds/Basketball/basketball_hard_0.wav -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Sounds/Basketball/basketball_hard_0.wav.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d1af5ba5cf63ccd4691b9165d0e2743e 3 | timeCreated: 1454449621 4 | licenseType: Free 5 | AudioImporter: 6 | serializedVersion: 6 7 | defaultSettings: 8 | loadType: 0 9 | sampleRateSetting: 0 10 | sampleRateOverride: 0 11 | compressionFormat: 1 12 | quality: 1 13 | conversionMode: 0 14 | platformSettingOverrides: {} 15 | forceToMono: 0 16 | preloadAudioData: 1 17 | loadInBackground: 0 18 | 3D: 1 19 | userData: 20 | assetBundleName: 21 | assetBundleVariant: 22 | -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Sounds/Basketball/basketball_hard_1.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScruffyRules/PhysSound-Open-Source/1a566879e40f4a1cb4d5a763d8ed649110524949/PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Sounds/Basketball/basketball_hard_1.wav -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Sounds/Basketball/basketball_hard_1.wav.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e271dd0dd4db34c4399362eedc9eb814 3 | timeCreated: 1454449621 4 | licenseType: Free 5 | AudioImporter: 6 | serializedVersion: 6 7 | defaultSettings: 8 | loadType: 0 9 | sampleRateSetting: 0 10 | sampleRateOverride: 0 11 | compressionFormat: 1 12 | quality: 1 13 | conversionMode: 0 14 | platformSettingOverrides: {} 15 | forceToMono: 0 16 | preloadAudioData: 1 17 | loadInBackground: 0 18 | 3D: 1 19 | userData: 20 | assetBundleName: 21 | assetBundleVariant: 22 | -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Sounds/Basketball/basketball_hard_2.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScruffyRules/PhysSound-Open-Source/1a566879e40f4a1cb4d5a763d8ed649110524949/PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Sounds/Basketball/basketball_hard_2.wav -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Sounds/Basketball/basketball_hard_2.wav.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f9b58bc297d651843bca2cb720a743ca 3 | timeCreated: 1454449622 4 | licenseType: Free 5 | AudioImporter: 6 | serializedVersion: 6 7 | defaultSettings: 8 | loadType: 0 9 | sampleRateSetting: 0 10 | sampleRateOverride: 0 11 | compressionFormat: 1 12 | quality: 1 13 | conversionMode: 0 14 | platformSettingOverrides: {} 15 | forceToMono: 0 16 | preloadAudioData: 1 17 | loadInBackground: 0 18 | 3D: 1 19 | userData: 20 | assetBundleName: 21 | assetBundleVariant: 22 | -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Sounds/Basketball/basketball_hard_3.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScruffyRules/PhysSound-Open-Source/1a566879e40f4a1cb4d5a763d8ed649110524949/PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Sounds/Basketball/basketball_hard_3.wav -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Sounds/Basketball/basketball_hard_3.wav.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7e06b4ddba04bdd4282fabf3bac913f1 3 | timeCreated: 1454449621 4 | licenseType: Free 5 | AudioImporter: 6 | serializedVersion: 6 7 | defaultSettings: 8 | loadType: 0 9 | sampleRateSetting: 0 10 | sampleRateOverride: 0 11 | compressionFormat: 1 12 | quality: 1 13 | conversionMode: 0 14 | platformSettingOverrides: {} 15 | forceToMono: 0 16 | preloadAudioData: 1 17 | loadInBackground: 0 18 | 3D: 1 19 | userData: 20 | assetBundleName: 21 | assetBundleVariant: 22 | -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Sounds/Basketball/basketball_soft_0.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScruffyRules/PhysSound-Open-Source/1a566879e40f4a1cb4d5a763d8ed649110524949/PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Sounds/Basketball/basketball_soft_0.wav -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Sounds/Basketball/basketball_soft_0.wav.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 212908ab48c469246a1fa3c110d3ff0f 3 | timeCreated: 1454449620 4 | licenseType: Free 5 | AudioImporter: 6 | serializedVersion: 6 7 | defaultSettings: 8 | loadType: 0 9 | sampleRateSetting: 0 10 | sampleRateOverride: 0 11 | compressionFormat: 1 12 | quality: 1 13 | conversionMode: 0 14 | platformSettingOverrides: {} 15 | forceToMono: 0 16 | preloadAudioData: 1 17 | loadInBackground: 0 18 | 3D: 1 19 | userData: 20 | assetBundleName: 21 | assetBundleVariant: 22 | -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Sounds/Basketball/basketball_soft_1.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScruffyRules/PhysSound-Open-Source/1a566879e40f4a1cb4d5a763d8ed649110524949/PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Sounds/Basketball/basketball_soft_1.wav -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Sounds/Basketball/basketball_soft_1.wav.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 77711f677035ce640998fd0811305b5f 3 | timeCreated: 1454449620 4 | licenseType: Free 5 | AudioImporter: 6 | serializedVersion: 6 7 | defaultSettings: 8 | loadType: 0 9 | sampleRateSetting: 0 10 | sampleRateOverride: 0 11 | compressionFormat: 1 12 | quality: 1 13 | conversionMode: 0 14 | platformSettingOverrides: {} 15 | forceToMono: 0 16 | preloadAudioData: 1 17 | loadInBackground: 0 18 | 3D: 1 19 | userData: 20 | assetBundleName: 21 | assetBundleVariant: 22 | -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Sounds/Basketball/basketball_soft_2.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScruffyRules/PhysSound-Open-Source/1a566879e40f4a1cb4d5a763d8ed649110524949/PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Sounds/Basketball/basketball_soft_2.wav -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Sounds/Basketball/basketball_soft_2.wav.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c728d5ae1fc69a34cacebe7ab17b6d00 3 | timeCreated: 1454449621 4 | licenseType: Free 5 | AudioImporter: 6 | serializedVersion: 6 7 | defaultSettings: 8 | loadType: 0 9 | sampleRateSetting: 0 10 | sampleRateOverride: 0 11 | compressionFormat: 1 12 | quality: 1 13 | conversionMode: 0 14 | platformSettingOverrides: {} 15 | forceToMono: 0 16 | preloadAudioData: 1 17 | loadInBackground: 0 18 | 3D: 1 19 | userData: 20 | assetBundleName: 21 | assetBundleVariant: 22 | -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Sounds/Basketball/basketball_soft_3.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScruffyRules/PhysSound-Open-Source/1a566879e40f4a1cb4d5a763d8ed649110524949/PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Sounds/Basketball/basketball_soft_3.wav -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Sounds/Basketball/basketball_soft_3.wav.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 35eaf9bc12ac83d4cbb64e0b7b559154 3 | timeCreated: 1454449620 4 | licenseType: Free 5 | AudioImporter: 6 | serializedVersion: 6 7 | defaultSettings: 8 | loadType: 0 9 | sampleRateSetting: 0 10 | sampleRateOverride: 0 11 | compressionFormat: 1 12 | quality: 1 13 | conversionMode: 0 14 | platformSettingOverrides: {} 15 | forceToMono: 0 16 | preloadAudioData: 1 17 | loadInBackground: 0 18 | 3D: 1 19 | userData: 20 | assetBundleName: 21 | assetBundleVariant: 22 | -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Sounds/Brick/brick_hit_0.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScruffyRules/PhysSound-Open-Source/1a566879e40f4a1cb4d5a763d8ed649110524949/PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Sounds/Brick/brick_hit_0.wav -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Sounds/Brick/brick_hit_0.wav.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 55e29cfc82dd7fd4eb76c2bd278b4c2a 3 | timeCreated: 1454449620 4 | licenseType: Free 5 | AudioImporter: 6 | serializedVersion: 6 7 | defaultSettings: 8 | loadType: 0 9 | sampleRateSetting: 0 10 | sampleRateOverride: 0 11 | compressionFormat: 1 12 | quality: 1 13 | conversionMode: 0 14 | platformSettingOverrides: {} 15 | forceToMono: 0 16 | preloadAudioData: 1 17 | loadInBackground: 0 18 | 3D: 1 19 | userData: 20 | assetBundleName: 21 | assetBundleVariant: 22 | -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Sounds/Brick/brick_hit_1.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScruffyRules/PhysSound-Open-Source/1a566879e40f4a1cb4d5a763d8ed649110524949/PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Sounds/Brick/brick_hit_1.wav -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Sounds/Brick/brick_hit_1.wav.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4c4aba3def01a094d91403627e8c2590 3 | timeCreated: 1454449620 4 | licenseType: Free 5 | AudioImporter: 6 | serializedVersion: 6 7 | defaultSettings: 8 | loadType: 0 9 | sampleRateSetting: 0 10 | sampleRateOverride: 0 11 | compressionFormat: 1 12 | quality: 1 13 | conversionMode: 0 14 | platformSettingOverrides: {} 15 | forceToMono: 0 16 | preloadAudioData: 1 17 | loadInBackground: 0 18 | 3D: 1 19 | userData: 20 | assetBundleName: 21 | assetBundleVariant: 22 | -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Sounds/Brick/brick_hit_2.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScruffyRules/PhysSound-Open-Source/1a566879e40f4a1cb4d5a763d8ed649110524949/PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Sounds/Brick/brick_hit_2.wav -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Sounds/Brick/brick_hit_2.wav.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 52bbe199a4a7c794499dbb74f2d0ea51 3 | timeCreated: 1454449620 4 | licenseType: Free 5 | AudioImporter: 6 | serializedVersion: 6 7 | defaultSettings: 8 | loadType: 0 9 | sampleRateSetting: 0 10 | sampleRateOverride: 0 11 | compressionFormat: 1 12 | quality: 1 13 | conversionMode: 0 14 | platformSettingOverrides: {} 15 | forceToMono: 0 16 | preloadAudioData: 1 17 | loadInBackground: 0 18 | 3D: 1 19 | userData: 20 | assetBundleName: 21 | assetBundleVariant: 22 | -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Sounds/Brick/brick_hit_3.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScruffyRules/PhysSound-Open-Source/1a566879e40f4a1cb4d5a763d8ed649110524949/PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Sounds/Brick/brick_hit_3.wav -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Sounds/Brick/brick_hit_3.wav.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 92e1f5d43019ce34fb640a8f8b80675a 3 | timeCreated: 1454449621 4 | licenseType: Free 5 | AudioImporter: 6 | serializedVersion: 6 7 | defaultSettings: 8 | loadType: 0 9 | sampleRateSetting: 0 10 | sampleRateOverride: 0 11 | compressionFormat: 1 12 | quality: 1 13 | conversionMode: 0 14 | platformSettingOverrides: {} 15 | forceToMono: 0 16 | preloadAudioData: 1 17 | loadInBackground: 0 18 | 3D: 1 19 | userData: 20 | assetBundleName: 21 | assetBundleVariant: 22 | -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Sounds/Brick/brick_hit_soft_0.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScruffyRules/PhysSound-Open-Source/1a566879e40f4a1cb4d5a763d8ed649110524949/PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Sounds/Brick/brick_hit_soft_0.wav -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Sounds/Brick/brick_hit_soft_0.wav.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 887f648090ad1814ca29c755e388e761 3 | timeCreated: 1454449621 4 | licenseType: Free 5 | AudioImporter: 6 | serializedVersion: 6 7 | defaultSettings: 8 | loadType: 0 9 | sampleRateSetting: 0 10 | sampleRateOverride: 0 11 | compressionFormat: 1 12 | quality: 1 13 | conversionMode: 0 14 | platformSettingOverrides: {} 15 | forceToMono: 0 16 | preloadAudioData: 1 17 | loadInBackground: 0 18 | 3D: 1 19 | userData: 20 | assetBundleName: 21 | assetBundleVariant: 22 | -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Sounds/Brick/brick_hit_soft_1.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScruffyRules/PhysSound-Open-Source/1a566879e40f4a1cb4d5a763d8ed649110524949/PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Sounds/Brick/brick_hit_soft_1.wav -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Sounds/Brick/brick_hit_soft_1.wav.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e9b2ebc743f64f54e88a6d7b0c22735c 3 | timeCreated: 1454449622 4 | licenseType: Free 5 | AudioImporter: 6 | serializedVersion: 6 7 | defaultSettings: 8 | loadType: 0 9 | sampleRateSetting: 0 10 | sampleRateOverride: 0 11 | compressionFormat: 1 12 | quality: 1 13 | conversionMode: 0 14 | platformSettingOverrides: {} 15 | forceToMono: 0 16 | preloadAudioData: 1 17 | loadInBackground: 0 18 | 3D: 1 19 | userData: 20 | assetBundleName: 21 | assetBundleVariant: 22 | -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Sounds/Brick/brick_hit_soft_2.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScruffyRules/PhysSound-Open-Source/1a566879e40f4a1cb4d5a763d8ed649110524949/PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Sounds/Brick/brick_hit_soft_2.wav -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Sounds/Brick/brick_hit_soft_2.wav.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 24d70d8d5dd91ce4788dffa0b8d52499 3 | timeCreated: 1454449620 4 | licenseType: Free 5 | AudioImporter: 6 | serializedVersion: 6 7 | defaultSettings: 8 | loadType: 0 9 | sampleRateSetting: 0 10 | sampleRateOverride: 0 11 | compressionFormat: 1 12 | quality: 1 13 | conversionMode: 0 14 | platformSettingOverrides: {} 15 | forceToMono: 0 16 | preloadAudioData: 1 17 | loadInBackground: 0 18 | 3D: 1 19 | userData: 20 | assetBundleName: 21 | assetBundleVariant: 22 | -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Sounds/Brick/brick_hit_soft_3.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScruffyRules/PhysSound-Open-Source/1a566879e40f4a1cb4d5a763d8ed649110524949/PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Sounds/Brick/brick_hit_soft_3.wav -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Sounds/Brick/brick_hit_soft_3.wav.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5c099903d219d5e4894f2fceb00794c7 3 | timeCreated: 1454449620 4 | licenseType: Free 5 | AudioImporter: 6 | serializedVersion: 6 7 | defaultSettings: 8 | loadType: 0 9 | sampleRateSetting: 0 10 | sampleRateOverride: 0 11 | compressionFormat: 1 12 | quality: 1 13 | conversionMode: 0 14 | platformSettingOverrides: {} 15 | forceToMono: 0 16 | preloadAudioData: 1 17 | loadInBackground: 0 18 | 3D: 1 19 | userData: 20 | assetBundleName: 21 | assetBundleVariant: 22 | -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Sounds/Metal/metal_pot_hit_0.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScruffyRules/PhysSound-Open-Source/1a566879e40f4a1cb4d5a763d8ed649110524949/PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Sounds/Metal/metal_pot_hit_0.wav -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Sounds/Metal/metal_pot_hit_0.wav.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 94619f80dd09282429d4923bd1353207 3 | AudioImporter: 4 | serializedVersion: 6 5 | defaultSettings: 6 | loadType: 0 7 | sampleRateSetting: 1 8 | sampleRateOverride: 0 9 | compressionFormat: 2 10 | quality: 0 11 | conversionMode: 0 12 | platformSettingOverrides: {} 13 | forceToMono: 0 14 | preloadAudioData: 1 15 | loadInBackground: 0 16 | 3D: 1 17 | userData: 18 | assetBundleName: 19 | assetBundleVariant: 20 | -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Sounds/Metal/metal_pot_hit_1.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScruffyRules/PhysSound-Open-Source/1a566879e40f4a1cb4d5a763d8ed649110524949/PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Sounds/Metal/metal_pot_hit_1.wav -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Sounds/Metal/metal_pot_hit_1.wav.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ea477303edc05924e9ac2b601b8d21ab 3 | AudioImporter: 4 | serializedVersion: 6 5 | defaultSettings: 6 | loadType: 0 7 | sampleRateSetting: 1 8 | sampleRateOverride: 0 9 | compressionFormat: 2 10 | quality: 0 11 | conversionMode: 0 12 | platformSettingOverrides: {} 13 | forceToMono: 0 14 | preloadAudioData: 1 15 | loadInBackground: 0 16 | 3D: 1 17 | userData: 18 | assetBundleName: 19 | assetBundleVariant: 20 | -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Sounds/Metal/metal_pot_hit_2.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScruffyRules/PhysSound-Open-Source/1a566879e40f4a1cb4d5a763d8ed649110524949/PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Sounds/Metal/metal_pot_hit_2.wav -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Sounds/Metal/metal_pot_hit_2.wav.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6898ead3978f3f24abde360099bc5ad2 3 | AudioImporter: 4 | serializedVersion: 6 5 | defaultSettings: 6 | loadType: 0 7 | sampleRateSetting: 1 8 | sampleRateOverride: 0 9 | compressionFormat: 2 10 | quality: 0 11 | conversionMode: 0 12 | platformSettingOverrides: {} 13 | forceToMono: 0 14 | preloadAudioData: 1 15 | loadInBackground: 0 16 | 3D: 1 17 | userData: 18 | assetBundleName: 19 | assetBundleVariant: 20 | -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Sounds/Metal/metal_pot_hit_3.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScruffyRules/PhysSound-Open-Source/1a566879e40f4a1cb4d5a763d8ed649110524949/PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Sounds/Metal/metal_pot_hit_3.wav -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Sounds/Metal/metal_pot_hit_3.wav.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 26310e1685b61dd49949544ac7b81735 3 | AudioImporter: 4 | serializedVersion: 6 5 | defaultSettings: 6 | loadType: 0 7 | sampleRateSetting: 1 8 | sampleRateOverride: 0 9 | compressionFormat: 2 10 | quality: 0 11 | conversionMode: 0 12 | platformSettingOverrides: {} 13 | forceToMono: 0 14 | preloadAudioData: 1 15 | loadInBackground: 0 16 | 3D: 1 17 | userData: 18 | assetBundleName: 19 | assetBundleVariant: 20 | -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Sounds/Metal/metal_pot_soft_hit_0.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScruffyRules/PhysSound-Open-Source/1a566879e40f4a1cb4d5a763d8ed649110524949/PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Sounds/Metal/metal_pot_soft_hit_0.wav -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Sounds/Metal/metal_pot_soft_hit_0.wav.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 00c6aca58d785ce41b7e5f77205818cd 3 | timeCreated: 1454449619 4 | licenseType: Free 5 | AudioImporter: 6 | serializedVersion: 6 7 | defaultSettings: 8 | loadType: 0 9 | sampleRateSetting: 0 10 | sampleRateOverride: 0 11 | compressionFormat: 1 12 | quality: 1 13 | conversionMode: 0 14 | platformSettingOverrides: {} 15 | forceToMono: 0 16 | preloadAudioData: 1 17 | loadInBackground: 0 18 | 3D: 1 19 | userData: 20 | assetBundleName: 21 | assetBundleVariant: 22 | -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Sounds/Metal/metal_pot_soft_hit_1.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScruffyRules/PhysSound-Open-Source/1a566879e40f4a1cb4d5a763d8ed649110524949/PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Sounds/Metal/metal_pot_soft_hit_1.wav -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Sounds/Metal/metal_pot_soft_hit_1.wav.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8235cc474e2aa644887d4bd26e664729 3 | timeCreated: 1454449621 4 | licenseType: Free 5 | AudioImporter: 6 | serializedVersion: 6 7 | defaultSettings: 8 | loadType: 0 9 | sampleRateSetting: 0 10 | sampleRateOverride: 0 11 | compressionFormat: 1 12 | quality: 1 13 | conversionMode: 0 14 | platformSettingOverrides: {} 15 | forceToMono: 0 16 | preloadAudioData: 1 17 | loadInBackground: 0 18 | 3D: 1 19 | userData: 20 | assetBundleName: 21 | assetBundleVariant: 22 | -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Sounds/Metal/metal_pot_soft_hit_2.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScruffyRules/PhysSound-Open-Source/1a566879e40f4a1cb4d5a763d8ed649110524949/PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Sounds/Metal/metal_pot_soft_hit_2.wav -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Sounds/Metal/metal_pot_soft_hit_2.wav.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bd68277d513e5474b9c8b3422406cec0 3 | timeCreated: 1454449621 4 | licenseType: Free 5 | AudioImporter: 6 | serializedVersion: 6 7 | defaultSettings: 8 | loadType: 0 9 | sampleRateSetting: 0 10 | sampleRateOverride: 0 11 | compressionFormat: 1 12 | quality: 1 13 | conversionMode: 0 14 | platformSettingOverrides: {} 15 | forceToMono: 0 16 | preloadAudioData: 1 17 | loadInBackground: 0 18 | 3D: 1 19 | userData: 20 | assetBundleName: 21 | assetBundleVariant: 22 | -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Sounds/Metal/metal_pot_soft_hit_3.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScruffyRules/PhysSound-Open-Source/1a566879e40f4a1cb4d5a763d8ed649110524949/PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Sounds/Metal/metal_pot_soft_hit_3.wav -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Sounds/Metal/metal_pot_soft_hit_3.wav.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ef3e8320fd4310747a758671194f5681 3 | timeCreated: 1454449622 4 | licenseType: Free 5 | AudioImporter: 6 | serializedVersion: 6 7 | defaultSettings: 8 | loadType: 0 9 | sampleRateSetting: 0 10 | sampleRateOverride: 0 11 | compressionFormat: 1 12 | quality: 1 13 | conversionMode: 0 14 | platformSettingOverrides: {} 15 | forceToMono: 0 16 | preloadAudioData: 1 17 | loadInBackground: 0 18 | 3D: 1 19 | userData: 20 | assetBundleName: 21 | assetBundleVariant: 22 | -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Sounds/Metal/metal_slide_hard.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScruffyRules/PhysSound-Open-Source/1a566879e40f4a1cb4d5a763d8ed649110524949/PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Sounds/Metal/metal_slide_hard.wav -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Sounds/Metal/metal_slide_hard.wav.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9a532385e5f2c8b4fbd8a76c22fa5862 3 | timeCreated: 1435175331 4 | licenseType: Free 5 | AudioImporter: 6 | serializedVersion: 6 7 | defaultSettings: 8 | loadType: 0 9 | sampleRateSetting: 1 10 | sampleRateOverride: 0 11 | compressionFormat: 2 12 | quality: 1 13 | conversionMode: 0 14 | platformSettingOverrides: {} 15 | forceToMono: 0 16 | preloadAudioData: 1 17 | loadInBackground: 0 18 | 3D: 1 19 | userData: 20 | assetBundleName: 21 | assetBundleVariant: 22 | -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Sounds/Rock/rock_small_hit_0.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScruffyRules/PhysSound-Open-Source/1a566879e40f4a1cb4d5a763d8ed649110524949/PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Sounds/Rock/rock_small_hit_0.wav -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Sounds/Rock/rock_small_hit_0.wav.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a6f70ffd42221a347a842d7fb84d02c1 3 | timeCreated: 1454449621 4 | licenseType: Free 5 | AudioImporter: 6 | serializedVersion: 6 7 | defaultSettings: 8 | loadType: 0 9 | sampleRateSetting: 0 10 | sampleRateOverride: 0 11 | compressionFormat: 1 12 | quality: 1 13 | conversionMode: 0 14 | platformSettingOverrides: {} 15 | forceToMono: 0 16 | preloadAudioData: 1 17 | loadInBackground: 0 18 | 3D: 1 19 | userData: 20 | assetBundleName: 21 | assetBundleVariant: 22 | -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Sounds/Rock/rock_small_hit_1.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScruffyRules/PhysSound-Open-Source/1a566879e40f4a1cb4d5a763d8ed649110524949/PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Sounds/Rock/rock_small_hit_1.wav -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Sounds/Rock/rock_small_hit_1.wav.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 694a53fae45622f4c8d2269c4d647399 3 | timeCreated: 1454449620 4 | licenseType: Free 5 | AudioImporter: 6 | serializedVersion: 6 7 | defaultSettings: 8 | loadType: 0 9 | sampleRateSetting: 0 10 | sampleRateOverride: 0 11 | compressionFormat: 1 12 | quality: 1 13 | conversionMode: 0 14 | platformSettingOverrides: {} 15 | forceToMono: 0 16 | preloadAudioData: 1 17 | loadInBackground: 0 18 | 3D: 1 19 | userData: 20 | assetBundleName: 21 | assetBundleVariant: 22 | -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Sounds/Rock/rock_small_hit_2.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScruffyRules/PhysSound-Open-Source/1a566879e40f4a1cb4d5a763d8ed649110524949/PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Sounds/Rock/rock_small_hit_2.wav -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Sounds/Rock/rock_small_hit_2.wav.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 037d5049bd713dd448f545820951fe1d 3 | timeCreated: 1454449619 4 | licenseType: Free 5 | AudioImporter: 6 | serializedVersion: 6 7 | defaultSettings: 8 | loadType: 0 9 | sampleRateSetting: 0 10 | sampleRateOverride: 0 11 | compressionFormat: 1 12 | quality: 1 13 | conversionMode: 0 14 | platformSettingOverrides: {} 15 | forceToMono: 0 16 | preloadAudioData: 1 17 | loadInBackground: 0 18 | 3D: 1 19 | userData: 20 | assetBundleName: 21 | assetBundleVariant: 22 | -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Sounds/Rock/rock_small_hit_3.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScruffyRules/PhysSound-Open-Source/1a566879e40f4a1cb4d5a763d8ed649110524949/PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Sounds/Rock/rock_small_hit_3.wav -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Sounds/Rock/rock_small_hit_3.wav.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e5c1f2ea7a813a7408be7faed3e6967e 3 | timeCreated: 1454449622 4 | licenseType: Free 5 | AudioImporter: 6 | serializedVersion: 6 7 | defaultSettings: 8 | loadType: 0 9 | sampleRateSetting: 0 10 | sampleRateOverride: 0 11 | compressionFormat: 1 12 | quality: 1 13 | conversionMode: 0 14 | platformSettingOverrides: {} 15 | forceToMono: 0 16 | preloadAudioData: 1 17 | loadInBackground: 0 18 | 3D: 1 19 | userData: 20 | assetBundleName: 21 | assetBundleVariant: 22 | -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Sounds/Thick Plastic/thick_plastic_hard_0.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScruffyRules/PhysSound-Open-Source/1a566879e40f4a1cb4d5a763d8ed649110524949/PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Sounds/Thick Plastic/thick_plastic_hard_0.wav -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Sounds/Thick Plastic/thick_plastic_hard_0.wav.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 980bc450974b2f747943e6819b67d206 3 | labels: 4 | - Physics 5 | - Sound 6 | - Audio 7 | - Impact 8 | timeCreated: 1431322488 9 | licenseType: Free 10 | AudioImporter: 11 | serializedVersion: 6 12 | defaultSettings: 13 | loadType: 0 14 | sampleRateSetting: 1 15 | sampleRateOverride: 0 16 | compressionFormat: 2 17 | quality: 1 18 | conversionMode: 0 19 | platformSettingOverrides: {} 20 | forceToMono: 0 21 | preloadAudioData: 1 22 | loadInBackground: 0 23 | 3D: 1 24 | userData: 25 | assetBundleName: 26 | assetBundleVariant: 27 | -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Sounds/Thick Plastic/thick_plastic_hard_1.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScruffyRules/PhysSound-Open-Source/1a566879e40f4a1cb4d5a763d8ed649110524949/PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Sounds/Thick Plastic/thick_plastic_hard_1.wav -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Sounds/Thick Plastic/thick_plastic_hard_1.wav.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3b61dca4647f61f4f9051378fa810e5c 3 | labels: 4 | - Physics 5 | - Sound 6 | - Audio 7 | - Impact 8 | timeCreated: 1431322488 9 | licenseType: Free 10 | AudioImporter: 11 | serializedVersion: 6 12 | defaultSettings: 13 | loadType: 0 14 | sampleRateSetting: 1 15 | sampleRateOverride: 0 16 | compressionFormat: 2 17 | quality: 1 18 | conversionMode: 0 19 | platformSettingOverrides: {} 20 | forceToMono: 0 21 | preloadAudioData: 1 22 | loadInBackground: 0 23 | 3D: 1 24 | userData: 25 | assetBundleName: 26 | assetBundleVariant: 27 | -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Sounds/Thick Plastic/thick_plastic_hard_2.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScruffyRules/PhysSound-Open-Source/1a566879e40f4a1cb4d5a763d8ed649110524949/PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Sounds/Thick Plastic/thick_plastic_hard_2.wav -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Sounds/Thick Plastic/thick_plastic_hard_2.wav.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1bb4e41ab7a6e9e449b95085d9c8cbb8 3 | labels: 4 | - Physics 5 | - Sound 6 | - Audio 7 | - Impact 8 | timeCreated: 1431322488 9 | licenseType: Free 10 | AudioImporter: 11 | serializedVersion: 6 12 | defaultSettings: 13 | loadType: 0 14 | sampleRateSetting: 1 15 | sampleRateOverride: 0 16 | compressionFormat: 2 17 | quality: 1 18 | conversionMode: 0 19 | platformSettingOverrides: {} 20 | forceToMono: 0 21 | preloadAudioData: 1 22 | loadInBackground: 0 23 | 3D: 1 24 | userData: 25 | assetBundleName: 26 | assetBundleVariant: 27 | -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Sounds/Thick Plastic/thick_plastic_hard_3.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScruffyRules/PhysSound-Open-Source/1a566879e40f4a1cb4d5a763d8ed649110524949/PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Sounds/Thick Plastic/thick_plastic_hard_3.wav -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Sounds/Thick Plastic/thick_plastic_hard_3.wav.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 421ed7e0506406741a0aef0d6e3ef3eb 3 | labels: 4 | - Physics 5 | - Sound 6 | - Audio 7 | - Impact 8 | timeCreated: 1431322488 9 | licenseType: Free 10 | AudioImporter: 11 | serializedVersion: 6 12 | defaultSettings: 13 | loadType: 0 14 | sampleRateSetting: 1 15 | sampleRateOverride: 0 16 | compressionFormat: 2 17 | quality: 1 18 | conversionMode: 0 19 | platformSettingOverrides: {} 20 | forceToMono: 0 21 | preloadAudioData: 1 22 | loadInBackground: 0 23 | 3D: 1 24 | userData: 25 | assetBundleName: 26 | assetBundleVariant: 27 | -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Sounds/Thick Plastic/thick_plastic_hard_4.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScruffyRules/PhysSound-Open-Source/1a566879e40f4a1cb4d5a763d8ed649110524949/PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Sounds/Thick Plastic/thick_plastic_hard_4.wav -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Sounds/Thick Plastic/thick_plastic_hard_4.wav.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2602c211fbeb62d4e9503d67d85bcb39 3 | labels: 4 | - Physics 5 | - Sound 6 | - Audio 7 | - Impact 8 | timeCreated: 1431322488 9 | licenseType: Free 10 | AudioImporter: 11 | serializedVersion: 6 12 | defaultSettings: 13 | loadType: 0 14 | sampleRateSetting: 1 15 | sampleRateOverride: 0 16 | compressionFormat: 2 17 | quality: 1 18 | conversionMode: 0 19 | platformSettingOverrides: {} 20 | forceToMono: 0 21 | preloadAudioData: 1 22 | loadInBackground: 0 23 | 3D: 1 24 | userData: 25 | assetBundleName: 26 | assetBundleVariant: 27 | -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Sounds/Thick Plastic/thick_plastic_slide_hard.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScruffyRules/PhysSound-Open-Source/1a566879e40f4a1cb4d5a763d8ed649110524949/PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Sounds/Thick Plastic/thick_plastic_slide_hard.wav -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Sounds/Thick Plastic/thick_plastic_slide_hard.wav.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: dc3b059c7c4ee6f4c9ddc7802e1df77a 3 | labels: 4 | - Physics 5 | - Sound 6 | - Audio 7 | - Impact 8 | timeCreated: 1431322260 9 | licenseType: Free 10 | AudioImporter: 11 | serializedVersion: 6 12 | defaultSettings: 13 | loadType: 0 14 | sampleRateSetting: 1 15 | sampleRateOverride: 0 16 | compressionFormat: 2 17 | quality: 1 18 | conversionMode: 0 19 | platformSettingOverrides: {} 20 | forceToMono: 0 21 | preloadAudioData: 1 22 | loadInBackground: 0 23 | 3D: 1 24 | userData: 25 | assetBundleName: 26 | assetBundleVariant: 27 | -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Sounds/Thick Plastic/thick_plastic_slide_soft.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScruffyRules/PhysSound-Open-Source/1a566879e40f4a1cb4d5a763d8ed649110524949/PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Sounds/Thick Plastic/thick_plastic_slide_soft.wav -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Sounds/Thick Plastic/thick_plastic_slide_soft.wav.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 23d13f52b5a01964e82ea27791642175 3 | labels: 4 | - Physics 5 | - Sound 6 | - Audio 7 | - Impact 8 | timeCreated: 1431324318 9 | licenseType: Free 10 | AudioImporter: 11 | serializedVersion: 6 12 | defaultSettings: 13 | loadType: 0 14 | sampleRateSetting: 1 15 | sampleRateOverride: 0 16 | compressionFormat: 2 17 | quality: 1 18 | conversionMode: 0 19 | platformSettingOverrides: {} 20 | forceToMono: 0 21 | preloadAudioData: 1 22 | loadInBackground: 0 23 | 3D: 1 24 | userData: 25 | assetBundleName: 26 | assetBundleVariant: 27 | -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Sounds/Thick Plastic/thick_plastic_soft_0.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScruffyRules/PhysSound-Open-Source/1a566879e40f4a1cb4d5a763d8ed649110524949/PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Sounds/Thick Plastic/thick_plastic_soft_0.wav -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Sounds/Thick Plastic/thick_plastic_soft_0.wav.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 37dc13e7cd58a0c42a0ba1ebbc1a5175 3 | labels: 4 | - Physics 5 | - Sound 6 | - Audio 7 | - Impact 8 | timeCreated: 1431324233 9 | licenseType: Free 10 | AudioImporter: 11 | serializedVersion: 6 12 | defaultSettings: 13 | loadType: 0 14 | sampleRateSetting: 1 15 | sampleRateOverride: 0 16 | compressionFormat: 2 17 | quality: 1 18 | conversionMode: 0 19 | platformSettingOverrides: {} 20 | forceToMono: 0 21 | preloadAudioData: 1 22 | loadInBackground: 0 23 | 3D: 1 24 | userData: 25 | assetBundleName: 26 | assetBundleVariant: 27 | -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Sounds/Thick Plastic/thick_plastic_soft_1.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScruffyRules/PhysSound-Open-Source/1a566879e40f4a1cb4d5a763d8ed649110524949/PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Sounds/Thick Plastic/thick_plastic_soft_1.wav -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Sounds/Thick Plastic/thick_plastic_soft_1.wav.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5e00459b4da2cb944bf653bf97849419 3 | labels: 4 | - Physics 5 | - Sound 6 | - Audio 7 | - Impact 8 | timeCreated: 1431324233 9 | licenseType: Free 10 | AudioImporter: 11 | serializedVersion: 6 12 | defaultSettings: 13 | loadType: 0 14 | sampleRateSetting: 1 15 | sampleRateOverride: 0 16 | compressionFormat: 2 17 | quality: 1 18 | conversionMode: 0 19 | platformSettingOverrides: {} 20 | forceToMono: 0 21 | preloadAudioData: 1 22 | loadInBackground: 0 23 | 3D: 1 24 | userData: 25 | assetBundleName: 26 | assetBundleVariant: 27 | -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Sounds/Thick Plastic/thick_plastic_soft_2.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScruffyRules/PhysSound-Open-Source/1a566879e40f4a1cb4d5a763d8ed649110524949/PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Sounds/Thick Plastic/thick_plastic_soft_2.wav -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Sounds/Thick Plastic/thick_plastic_soft_2.wav.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: db9b5d1b73592c84483d812421922982 3 | labels: 4 | - Physics 5 | - Sound 6 | - Audio 7 | - Impact 8 | timeCreated: 1431324233 9 | licenseType: Free 10 | AudioImporter: 11 | serializedVersion: 6 12 | defaultSettings: 13 | loadType: 0 14 | sampleRateSetting: 1 15 | sampleRateOverride: 0 16 | compressionFormat: 2 17 | quality: 1 18 | conversionMode: 0 19 | platformSettingOverrides: {} 20 | forceToMono: 0 21 | preloadAudioData: 1 22 | loadInBackground: 0 23 | 3D: 1 24 | userData: 25 | assetBundleName: 26 | assetBundleVariant: 27 | -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Sounds/Thick Plastic/thick_plastic_soft_3.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScruffyRules/PhysSound-Open-Source/1a566879e40f4a1cb4d5a763d8ed649110524949/PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Sounds/Thick Plastic/thick_plastic_soft_3.wav -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Demo/Sounds/Thick Plastic/thick_plastic_soft_3.wav.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 57d16b0b78483ab41b8e3df634f1e223 3 | labels: 4 | - Physics 5 | - Sound 6 | - Audio 7 | - Impact 8 | timeCreated: 1431324233 9 | licenseType: Free 10 | AudioImporter: 11 | serializedVersion: 6 12 | defaultSettings: 13 | loadType: 0 14 | sampleRateSetting: 1 15 | sampleRateOverride: 0 16 | compressionFormat: 2 17 | quality: 1 18 | conversionMode: 0 19 | platformSettingOverrides: {} 20 | forceToMono: 0 21 | preloadAudioData: 1 22 | loadInBackground: 0 23 | 3D: 1 24 | userData: 25 | assetBundleName: 26 | assetBundleVariant: 27 | -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Docs/PhysSound Guide & Docs.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScruffyRules/PhysSound-Open-Source/1a566879e40f4a1cb4d5a763d8ed649110524949/PhysSound_2.6.0_Beta/Assets/PhysSound/Docs/PhysSound Guide & Docs.pdf -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Docs/PhysSound Guide & Docs.pdf.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8d4b635fea136904f9c0f437997a6928 3 | timeCreated: 1470705592 4 | licenseType: Free 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Scripts/Editor/CreatePhysSoundMaterial.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEditor; 3 | 4 | namespace PhysSound 5 | { 6 | public class CreatePhysSoundMaterial 7 | { 8 | [MenuItem("Assets/Create/PhysSound Material")] 9 | 10 | public static void Create() 11 | { 12 | PhysSoundMaterial asset = ScriptableObject.CreateInstance(); 13 | 14 | AssetDatabase.CreateAsset(asset, "Assets/PhysSoundMaterial.asset"); 15 | AssetDatabase.SaveAssets(); 16 | 17 | EditorUtility.FocusProjectWindow(); 18 | 19 | Selection.activeObject = asset; 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Scripts/Editor/CreatePhysSoundMaterial.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f464a4fb36175d849a9a8079f7279ffc 3 | labels: 4 | - Physics 5 | - Sound 6 | - Audio 7 | - Impact 8 | timeCreated: 1431279154 9 | licenseType: Free 10 | MonoImporter: 11 | serializedVersion: 2 12 | defaultReferences: [] 13 | executionOrder: 0 14 | icon: {instanceID: 0} 15 | userData: 16 | assetBundleName: 17 | assetBundleVariant: 18 | -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Scripts/Editor/PhysSoundMaterialEditor.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEditor; 3 | 4 | namespace PhysSound 5 | { 6 | [CustomEditor(typeof(PhysSoundMaterial))] 7 | [CanEditMultipleObjects] 8 | public class PhysSoundMaterialEditor : Editor 9 | { 10 | PhysSoundMaterial mat; 11 | float dividerHeight = 2; 12 | 13 | FoldoutList audioSetFoldout = new FoldoutList(); 14 | FoldoutList impactsFoldout = new FoldoutList(); 15 | 16 | SerializedProperty timeScalePitch, pitchRand, scaleMod, slidePitchMod, slideVolMult, useColVel, scImpVol, relVelThr, impNormBias, collMask; 17 | 18 | public override void OnInspectorGUI() 19 | { 20 | mat = target as PhysSoundMaterial; 21 | bool dupeFound = false; 22 | bool nullFound = false; 23 | 24 | timeScalePitch = serializedObject.FindProperty("TimeScalePitch"); 25 | pitchRand = serializedObject.FindProperty("PitchRandomness"); 26 | scaleMod = serializedObject.FindProperty("ScaleMod"); 27 | slidePitchMod = serializedObject.FindProperty("SlidePitchMod"); 28 | slideVolMult = serializedObject.FindProperty("SlideVolMultiplier"); 29 | useColVel = serializedObject.FindProperty("UseCollisionVelocity"); 30 | scImpVol = serializedObject.FindProperty("ScaleImpactVolume"); 31 | relVelThr = serializedObject.FindProperty("RelativeVelocityThreshold"); 32 | impNormBias = serializedObject.FindProperty("ImpactNormalBias"); 33 | collMask = serializedObject.FindProperty("CollisionMask"); 34 | 35 | serializedObject.Update(); 36 | 37 | EditorGUILayout.LabelField("General Properties:", EditorStyles.boldLabel); 38 | 39 | mat.MaterialTypeKey = EditorGUILayout.Popup("Material Type", mat.MaterialTypeKey, PhysSoundTypeList.PhysSoundTypes); 40 | EditorGUILayout.Separator(); 41 | 42 | EditorGUILayout.PropertyField(relVelThr, true); 43 | mat.VolumeCurve = EditorGUILayout.CurveField("Volume Curve", mat.VolumeCurve); 44 | 45 | EditorGUILayout.Separator(); 46 | 47 | EditorGUILayout.PropertyField(pitchRand); 48 | EditorGUILayout.PropertyField(timeScalePitch); 49 | EditorGUILayout.Slider(scaleMod, 0, 1, "Object Scale Mod"); 50 | EditorGUILayout.Slider(impNormBias, 0, 1, "Impact Normal Bias"); 51 | 52 | EditorGUILayout.Separator(); 53 | 54 | EditorGUILayout.PropertyField(slidePitchMod); 55 | EditorGUILayout.PropertyField(slideVolMult); 56 | 57 | EditorGUILayout.Separator(); 58 | 59 | EditorGUILayout.PropertyField(collMask); 60 | 61 | EditorGUILayout.Separator(); 62 | 63 | EditorGUILayout.PropertyField(useColVel); 64 | EditorGUILayout.PropertyField(scImpVol); 65 | 66 | EditorGUILayout.Separator(); 67 | GUILayout.Box("", GUILayout.MaxWidth(Screen.width - 25f), GUILayout.Height(dividerHeight)); 68 | 69 | EditorGUILayout.LabelField("Audio Sets:", EditorStyles.boldLabel); 70 | 71 | if (mat.AudioSets.Count == 0) 72 | { 73 | GUILayout.BeginHorizontal(); 74 | GUILayout.FlexibleSpace(); 75 | 76 | GUILayout.Label("The Audio Set List is Empty.", EditorStyles.boldLabel); 77 | 78 | GUILayout.FlexibleSpace(); 79 | GUILayout.EndHorizontal(); 80 | } 81 | else 82 | { 83 | mat.FallbackTypeIndex = EditorGUILayout.Popup("Fallback Audio Set", mat.FallbackTypeIndex, mat.GetFallbackAudioSets()); 84 | 85 | if (mat.UseCollisionVelocity) 86 | EditorGUILayout.HelpBox("You are using Collision Velocity. Remember that Impact clips must be ordered from least forceful to most forceful.", MessageType.Info); 87 | 88 | EditorGUILayout.Separator(); 89 | 90 | audioSetFoldout.Update(mat.AudioSets.Count, false); 91 | impactsFoldout.Update(mat.AudioSets.Count, false); 92 | 93 | for (int i = 0; i < mat.AudioSets.Count; i++) 94 | { 95 | PhysSoundAudioSet aud = mat.AudioSets[i]; 96 | Color c = GUI.color; 97 | 98 | if (hasDuplicate(aud)) 99 | { 100 | dupeFound = true; 101 | GUI.color = new Color(1, 0.5f, 0.5f); 102 | } 103 | 104 | if (!PhysSoundTypeList.HasKey(aud.Key)) 105 | { 106 | nullFound = true; 107 | GUI.color = new Color(1, 0.5f, 0.5f); 108 | } 109 | 110 | EditorGUILayout.BeginHorizontal(); 111 | 112 | audioSetFoldout[i] = EditorGUILayout.Foldout(audioSetFoldout[i], "Material Type:"); 113 | GUILayout.Space(35); 114 | aud.Key = EditorGUILayout.Popup(aud.Key, PhysSoundTypeList.PhysSoundTypes); 115 | 116 | GUILayout.FlexibleSpace(); 117 | 118 | GUI.color = c * new Color(1, 1, 0.5f); 119 | 120 | if (GUILayout.Button("Remove", GUILayout.MaxWidth(75), GUILayout.MaxHeight(17))) 121 | { 122 | mat.AudioSets.RemoveAt(i); 123 | i--; 124 | continue; 125 | } 126 | 127 | GUI.color = c; 128 | 129 | EditorGUILayout.EndHorizontal(); 130 | 131 | if (audioSetFoldout[i]) 132 | { 133 | GUILayout.BeginVertical(EditorStyles.textField); 134 | GUILayout.Space(3); 135 | 136 | EditorGUI.indentLevel++; 137 | impactsFoldout[i] = EditorGUILayout.Foldout(impactsFoldout[i], "Impact Clips"); 138 | 139 | if (impactsFoldout[i]) 140 | { 141 | AudioClip newClip = null; 142 | newClip = EditorGUILayout.ObjectField("Add Clip", newClip, typeof(AudioClip), true) as AudioClip; 143 | 144 | if (newClip != null) 145 | { 146 | aud.Impacts.Add(newClip); 147 | } 148 | 149 | for (int j = 0; j < aud.Impacts.Count; j++) 150 | { 151 | GUILayout.BeginHorizontal(); 152 | aud.Impacts[j] = EditorGUILayout.ObjectField(aud.Impacts[j], typeof(AudioClip), true) as AudioClip; 153 | 154 | if (GUILayout.Button("X", GUILayout.MaxWidth(18), GUILayout.MaxHeight(15))) 155 | { 156 | aud.Impacts.RemoveAt(j); 157 | i--; 158 | } 159 | 160 | GUILayout.EndHorizontal(); 161 | } 162 | EditorGUILayout.Separator(); 163 | } 164 | EditorGUI.indentLevel--; 165 | 166 | aud.Slide = EditorGUILayout.ObjectField("Slide Clip", aud.Slide, typeof(AudioClip), true) as AudioClip; 167 | 168 | GUILayout.Space(3); 169 | GUILayout.EndVertical(); 170 | } 171 | 172 | GUILayout.Space(2); 173 | } 174 | } 175 | GUILayout.Space(2); 176 | EditorGUILayout.BeginHorizontal(); 177 | GUILayout.FlexibleSpace(); 178 | 179 | if (GUILayout.Button("Add New Audio Set", GUILayout.MaxWidth(150), GUILayout.Height(25))) 180 | { 181 | mat.AudioSets.Add(new PhysSoundAudioSet()); 182 | } 183 | 184 | GUILayout.FlexibleSpace(); 185 | EditorGUILayout.EndHorizontal(); 186 | 187 | if (dupeFound) 188 | EditorGUILayout.HelpBox("You have multiple Audio Sets with for the same Material Type! Any duplicate sets will not be used during runtime.", MessageType.Error); 189 | if (nullFound) 190 | EditorGUILayout.HelpBox("You have Audio Sets with invalid material types!", MessageType.Error); 191 | 192 | EditorUtility.SetDirty(mat); 193 | 194 | serializedObject.ApplyModifiedProperties(); 195 | } 196 | 197 | bool hasDuplicate(PhysSoundAudioSet aud) 198 | { 199 | foreach (PhysSoundAudioSet audSet in mat.AudioSets) 200 | { 201 | if (audSet != aud && audSet.Key == aud.Key) 202 | return true; 203 | } 204 | 205 | return false; 206 | } 207 | } 208 | } -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Scripts/Editor/PhysSoundMaterialEditor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0b1e4a817bdc70146bb52d4bb337ea8e 3 | labels: 4 | - Physics 5 | - Sound 6 | - Audio 7 | - Impact 8 | timeCreated: 1432338560 9 | licenseType: Free 10 | MonoImporter: 11 | serializedVersion: 2 12 | defaultReferences: [] 13 | executionOrder: 0 14 | icon: {instanceID: 0} 15 | userData: 16 | assetBundleName: 17 | assetBundleVariant: 18 | -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Scripts/Editor/PhysSoundObjectEditor.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEditor; 3 | 4 | namespace PhysSound 5 | { 6 | [CustomEditor(typeof(PhysSoundObject))] 7 | [CanEditMultipleObjects] 8 | public class PhysSoundObjectEditor : Editor 9 | { 10 | float dividerHeight = 2; 11 | 12 | SerializedProperty mat, impactAudio, autoCreate, playClipPoint, hitsTriggers; 13 | PhysSoundObject obj; 14 | 15 | public override void OnInspectorGUI() 16 | { 17 | serializedObject.Update(); 18 | obj = target as PhysSoundObject; 19 | 20 | mat = serializedObject.FindProperty("SoundMaterial"); 21 | impactAudio = serializedObject.FindProperty("ImpactAudio"); 22 | autoCreate = serializedObject.FindProperty("AutoCreateSources"); 23 | playClipPoint = serializedObject.FindProperty("PlayClipAtPoint"); 24 | hitsTriggers = serializedObject.FindProperty("HitsTriggers"); 25 | 26 | EditorGUILayout.Separator(); 27 | 28 | EditorGUILayout.LabelField("PhysSound Material:", EditorStyles.boldLabel); 29 | 30 | EditorGUILayout.PropertyField(mat, true); 31 | 32 | if (obj.SoundMaterial == null) 33 | { 34 | EditorGUILayout.HelpBox("No PhysSound Material is assigned!", MessageType.Warning); 35 | serializedObject.ApplyModifiedProperties(); 36 | return; 37 | } 38 | 39 | //Update the audio container list with new audio sets 40 | foreach (PhysSoundAudioSet audSet in obj.SoundMaterial.AudioSets) 41 | { 42 | if (!obj.HasAudioContainer(audSet.Key) && audSet.Slide != null) 43 | { 44 | obj.AddAudioContainer(audSet.Key); 45 | EditorUtility.SetDirty(obj); 46 | } 47 | } 48 | 49 | //Remove any audio containers that don't match with the material. 50 | for (int i = 0; i < obj.AudioContainers.Count; i++) 51 | { 52 | PhysSoundAudioContainer audCont = obj.AudioContainers[i]; 53 | 54 | if (!obj.SoundMaterial.HasAudioSet(audCont.KeyIndex) || obj.SoundMaterial.GetAudioSet(audCont.KeyIndex).Slide == null) 55 | { 56 | obj.RemoveAudioContainer(audCont.KeyIndex); 57 | EditorUtility.SetDirty(obj); 58 | i--; 59 | continue; 60 | } 61 | } 62 | 63 | //EditorGUILayout.Separator(); 64 | 65 | if (obj.SoundMaterial.AudioSets.Count > 0) 66 | { 67 | GUILayout.Box("", GUILayout.MaxWidth(Screen.width - 25f), GUILayout.Height(dividerHeight)); 68 | 69 | EditorGUILayout.LabelField("Audio Sources:", EditorStyles.boldLabel); 70 | 71 | if (!obj.PlayClipAtPoint) 72 | EditorGUILayout.PropertyField(autoCreate); 73 | 74 | EditorGUILayout.PropertyField(playClipPoint, new GUIContent("Use Audio Pool")); 75 | EditorGUILayout.PropertyField(hitsTriggers); 76 | 77 | EditorGUILayout.Separator(); 78 | 79 | if (obj.AutoCreateSources) 80 | { 81 | EditorGUILayout.PropertyField(impactAudio, new GUIContent("Template Audio"), true); 82 | } 83 | else 84 | { 85 | if (!obj.PlayClipAtPoint) 86 | { 87 | EditorGUILayout.PropertyField(impactAudio, true); 88 | 89 | EditorGUILayout.Separator(); 90 | 91 | for (int i = 0; i < obj.AudioContainers.Count; i++) 92 | { 93 | PhysSoundAudioContainer audCont = obj.AudioContainers[i]; 94 | audCont.SlideAudio = EditorGUILayout.ObjectField(PhysSoundTypeList.GetKey(audCont.KeyIndex) + " Slide Audio", audCont.SlideAudio, typeof(AudioSource), true) as AudioSource; 95 | } 96 | } 97 | else 98 | EditorGUILayout.PropertyField(impactAudio, new GUIContent("Template Impact Audio"), true); 99 | } 100 | } 101 | 102 | EditorUtility.SetDirty(obj); 103 | EditorGUILayout.Separator(); 104 | GUILayout.Box("", GUILayout.MaxWidth(Screen.width - 25f), GUILayout.Height(dividerHeight)); 105 | 106 | EditorGUILayout.Separator(); 107 | 108 | serializedObject.ApplyModifiedProperties(); 109 | } 110 | } 111 | } -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Scripts/Editor/PhysSoundObjectEditor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 34451acac578b4f48abbf7e03b23278b 3 | labels: 4 | - Physics 5 | - Sound 6 | - Audio 7 | - Impact 8 | timeCreated: 1432344132 9 | licenseType: Free 10 | MonoImporter: 11 | serializedVersion: 2 12 | defaultReferences: [] 13 | executionOrder: 0 14 | icon: {instanceID: 0} 15 | userData: 16 | assetBundleName: 17 | assetBundleVariant: 18 | -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Scripts/Editor/PhysSoundObjectLiteEditor.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEditor; 3 | 4 | namespace PhysSound 5 | { 6 | [CustomEditor(typeof(PhysSoundObjectLite))] 7 | [CanEditMultipleObjects] 8 | public class PhysSoundObjectLiteEditor : Editor 9 | { 10 | float dividerHeight = 2; 11 | 12 | SerializedProperty mat, impactAudio, autoCreate, playClipPoint, hitsTriggers; 13 | PhysSoundObjectLite obj; 14 | 15 | public override void OnInspectorGUI() 16 | { 17 | serializedObject.Update(); 18 | obj = target as PhysSoundObjectLite; 19 | 20 | mat = serializedObject.FindProperty("SoundMaterial"); 21 | impactAudio = serializedObject.FindProperty("ImpactAudio"); 22 | autoCreate = serializedObject.FindProperty("AutoCreateSources"); 23 | playClipPoint = serializedObject.FindProperty("PlayClipAtPoint"); 24 | hitsTriggers = serializedObject.FindProperty("HitsTriggers"); 25 | 26 | EditorGUILayout.Separator(); 27 | 28 | EditorGUILayout.LabelField("PhysSound Material:", EditorStyles.boldLabel); 29 | 30 | EditorGUILayout.PropertyField(mat, true); 31 | 32 | if (obj.SoundMaterial == null) 33 | { 34 | EditorGUILayout.HelpBox("No PhysSound Material is assigned!", MessageType.Warning); 35 | serializedObject.ApplyModifiedProperties(); 36 | return; 37 | } 38 | 39 | //EditorGUILayout.Separator(); 40 | 41 | if (obj.SoundMaterial.AudioSets.Count > 0) 42 | { 43 | GUILayout.Box("", GUILayout.MaxWidth(Screen.width - 25f), GUILayout.Height(dividerHeight)); 44 | 45 | EditorGUILayout.LabelField("Audio Sources:", EditorStyles.boldLabel); 46 | 47 | EditorGUILayout.PropertyField(autoCreate); 48 | EditorGUILayout.PropertyField(playClipPoint, new GUIContent("Use Audio Pool")); 49 | EditorGUILayout.PropertyField(hitsTriggers); 50 | 51 | EditorGUILayout.Separator(); 52 | 53 | if (obj.AutoCreateSources) 54 | { 55 | EditorGUILayout.PropertyField(impactAudio, new GUIContent("Template Audio"), true); 56 | } 57 | else 58 | { 59 | if (!obj.PlayClipAtPoint) 60 | EditorGUILayout.PropertyField(impactAudio, true); 61 | else 62 | EditorGUILayout.PropertyField(impactAudio, new GUIContent("Template Impact Audio"), true); 63 | 64 | } 65 | } 66 | 67 | EditorUtility.SetDirty(obj); 68 | EditorGUILayout.Separator(); 69 | GUILayout.Box("", GUILayout.MaxWidth(Screen.width - 25f), GUILayout.Height(dividerHeight)); 70 | 71 | EditorGUILayout.Separator(); 72 | 73 | serializedObject.ApplyModifiedProperties(); 74 | } 75 | } 76 | } -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Scripts/Editor/PhysSoundObjectLiteEditor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 939a77ca1a9770d48adcdedac0a107ea 3 | labels: 4 | - Physics 5 | - Sound 6 | - Audio 7 | - Impact 8 | timeCreated: 1489954395 9 | licenseType: Free 10 | MonoImporter: 11 | serializedVersion: 2 12 | defaultReferences: [] 13 | executionOrder: 0 14 | icon: {instanceID: 0} 15 | userData: 16 | assetBundleName: 17 | assetBundleVariant: 18 | -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Scripts/Editor/PhysSoundTerrainEditor.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEditor; 3 | 4 | namespace PhysSound 5 | { 6 | [CustomEditor(typeof(PhysSoundTerrain))] 7 | public class PhysSoundTerrainEditor : Editor 8 | { 9 | PhysSoundTerrain physTerr; 10 | 11 | bool matFoldout; 12 | Vector2 matScroll; 13 | 14 | void Awake() 15 | { 16 | physTerr = target as PhysSoundTerrain; 17 | physTerr.Terrain = physTerr.GetComponent(); 18 | } 19 | 20 | public override void OnInspectorGUI() 21 | { 22 | physTerr = target as PhysSoundTerrain; 23 | 24 | serializedObject.Update(); 25 | 26 | if (physTerr.Terrain == null) 27 | { 28 | EditorGUILayout.HelpBox("No Terrain was found!", MessageType.Error); 29 | serializedObject.ApplyModifiedProperties(); 30 | return; 31 | } 32 | 33 | EditorGUILayout.Separator(); 34 | 35 | EditorGUILayout.LabelField("PhysSound Terrain Materials:", EditorStyles.boldLabel); 36 | 37 | matFoldout = EditorGUILayout.Foldout(matFoldout, "PhysSound Materials List"); 38 | 39 | SplatPrototype[] textures = physTerr.Terrain.terrainData.splatPrototypes; 40 | 41 | while (physTerr.SoundMaterials.Count > textures.Length) 42 | { 43 | physTerr.SoundMaterials.RemoveAt(physTerr.SoundMaterials.Count - 1); 44 | } 45 | 46 | if (matFoldout) 47 | { 48 | matScroll = EditorGUILayout.BeginScrollView(matScroll, GUILayout.MaxHeight(200)); 49 | 50 | for (int i = 0; i < textures.Length; i++) 51 | { 52 | if (i >= physTerr.SoundMaterials.Count) 53 | { 54 | physTerr.SoundMaterials.Add(null); 55 | } 56 | 57 | SplatPrototype sp = textures[i]; 58 | GUILayout.BeginHorizontal(); 59 | 60 | GUILayout.Box(sp.texture, GUILayout.Width(50), GUILayout.Height(50)); 61 | 62 | GUILayout.BeginVertical(); 63 | EditorGUILayout.LabelField("Splat Texture: " + sp.texture.name); 64 | physTerr.SoundMaterials[i] = (PhysSoundMaterial)EditorGUILayout.ObjectField(physTerr.SoundMaterials[i], typeof(PhysSoundMaterial), false); 65 | GUILayout.EndVertical(); 66 | 67 | GUILayout.EndHorizontal(); 68 | GUILayout.Box("", GUILayout.MaxWidth(Screen.width - 25f), GUILayout.Height(1)); 69 | } 70 | EditorGUILayout.EndScrollView(); 71 | } 72 | 73 | EditorGUILayout.Separator(); 74 | serializedObject.ApplyModifiedProperties(); 75 | } 76 | } 77 | } -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Scripts/Editor/PhysSoundTerrainEditor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 91c0dc3ffa247314b8af35444e57e413 3 | labels: 4 | - Physics 5 | - Sound 6 | - Audio 7 | - Impact 8 | timeCreated: 1432442511 9 | licenseType: Free 10 | MonoImporter: 11 | serializedVersion: 2 12 | defaultReferences: [] 13 | executionOrder: 0 14 | icon: {instanceID: 0} 15 | userData: 16 | assetBundleName: 17 | assetBundleVariant: 18 | -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Scripts/Editor/PhysSoundTypeEditor.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEditor; 3 | using System.Collections.Generic; 4 | using System.IO; 5 | 6 | namespace PhysSound 7 | { 8 | public class PhysSoundTypeEditor : EditorWindow 9 | { 10 | float dividerHeight = 2; 11 | bool duplicateValBlock = false; 12 | List tempTypes = new List(); 13 | int tempPoolSize; 14 | 15 | [MenuItem("Window/PhysSound/PhysSound Settings")] 16 | public static void ShowWindow() 17 | { 18 | PhysSoundTypeEditor w = EditorWindow.GetWindow(); 19 | 20 | #if UNITY_5_1 21 | w.titleContent = new GUIContent("PhysSound"); 22 | #else 23 | w.title = "PhysSound"; 24 | #endif 25 | 26 | w.Initialize(); 27 | } 28 | 29 | public void Initialize() 30 | { 31 | loadTypes(); 32 | loadPoolSize(); 33 | } 34 | 35 | void OnGUI() 36 | { 37 | EditorGUILayout.Separator(); 38 | 39 | //EditorGUILayout.LabelField("Use this editor to define your own Material Types for the PhysSound system.", EditorStyles.helpBox); 40 | EditorGUILayout.HelpBox("You must click the 'Save' button before you close the window if you want to save your changes!", MessageType.Warning); 41 | 42 | GUILayout.Box("", GUILayout.MaxWidth(Screen.width), GUILayout.Height(dividerHeight)); 43 | 44 | EditorGUILayout.LabelField("Material Types", EditorStyles.boldLabel); 45 | bool hasFoundDupe = false; 46 | 47 | GUILayout.BeginVertical(EditorStyles.textField); 48 | 49 | EditorGUILayout.Separator(); 50 | 51 | for (int i = 0; i < tempTypes.Count; i++) 52 | { 53 | EditorGUILayout.BeginHorizontal(); 54 | 55 | if (hasDuplicates(i)) 56 | { 57 | GUI.color = new Color(1, 0.5f, 0.5f); 58 | hasFoundDupe = true; 59 | } 60 | 61 | string newKey = EditorGUILayout.TextField(tempTypes[i]); 62 | 63 | updateMaterialType(i, newKey); 64 | 65 | GUI.color = new Color(1, 1, 0.5f); 66 | 67 | if (GUILayout.Button("Remove", GUILayout.MaxWidth(70), GUILayout.MaxHeight(15))) 68 | { 69 | tempTypes.RemoveAt(i); 70 | i--; 71 | } 72 | 73 | GUI.color = Color.white; 74 | 75 | EditorGUILayout.EndHorizontal(); 76 | 77 | GUI.color = Color.white; 78 | } 79 | 80 | EditorGUILayout.Separator(); 81 | 82 | if (hasFoundDupe) 83 | duplicateValBlock = true; 84 | else 85 | duplicateValBlock = false; 86 | 87 | EditorGUILayout.BeginHorizontal(); 88 | GUILayout.FlexibleSpace(); 89 | 90 | if (GUILayout.Button("Add New Type", GUILayout.MaxWidth(150))) 91 | { 92 | tempTypes.Add("New Type"); 93 | } 94 | 95 | GUILayout.FlexibleSpace(); 96 | EditorGUILayout.EndHorizontal(); 97 | GUILayout.Space(5f); 98 | GUILayout.EndVertical(); 99 | 100 | if (duplicateValBlock) 101 | { 102 | EditorGUILayout.HelpBox("You have duplicate Type names! You will not be able to save your changes until you have no duplicates.", MessageType.Error); 103 | GUI.enabled = false; 104 | } 105 | 106 | EditorGUILayout.Separator(); 107 | 108 | GUILayout.Box("", GUILayout.MaxWidth(Screen.width), GUILayout.Height(dividerHeight)); 109 | EditorGUILayout.LabelField("Other Settings", EditorStyles.boldLabel); 110 | 111 | tempPoolSize = EditorGUILayout.IntField("Audio Pool Size", tempPoolSize); 112 | 113 | EditorGUILayout.Separator(); 114 | 115 | EditorGUILayout.BeginHorizontal(); 116 | GUILayout.FlexibleSpace(); 117 | 118 | if (GUILayout.Button("Save", GUILayout.MaxWidth(125))) 119 | { 120 | saveTypes(); 121 | savePoolSize(); 122 | } 123 | 124 | GUI.color = new Color(1, 1, 0.5f); 125 | 126 | GUI.enabled = true; 127 | 128 | if (GUILayout.Button("Revert", GUILayout.MaxWidth(125))) 129 | { 130 | if (EditorUtility.DisplayDialog("Revert?", "This will discard all currently unsaved changes.", "Continue", "Cancel")) 131 | { 132 | loadTypes(); 133 | loadPoolSize(); 134 | } 135 | } 136 | 137 | GUI.color = Color.white; 138 | 139 | GUILayout.FlexibleSpace(); 140 | EditorGUILayout.EndHorizontal(); 141 | 142 | 143 | } 144 | 145 | #region Utility 146 | 147 | void updateMaterialType(int index, string newkey) 148 | { 149 | if (index < 0 || index >= tempTypes.Count) 150 | return; 151 | 152 | tempTypes[index] = newkey; 153 | } 154 | 155 | bool hasDuplicates(int index) 156 | { 157 | for (int j = 0; j < tempTypes.Count; j++) 158 | { 159 | if (index == j) 160 | continue; 161 | 162 | if (tempTypes[index] == tempTypes[j]) 163 | return true; 164 | } 165 | 166 | return false; 167 | } 168 | 169 | #endregion 170 | 171 | #region Saving and Loading 172 | 173 | void saveTypes() 174 | { 175 | string filePath; 176 | 177 | string[] assets = AssetDatabase.FindAssets("PhysSoundTypeList"); 178 | if (assets.Length > 0) 179 | filePath = AssetDatabase.GUIDToAssetPath(assets[0]).Split(new string[] { "Assets" }, System.StringSplitOptions.RemoveEmptyEntries)[0]; 180 | else 181 | { 182 | Debug.LogError("Could not find PhysSoundTypeList.cs asset. Create a new one at a desired location for it to be overwritten."); 183 | return; 184 | } 185 | 186 | StreamWriter sw = new StreamWriter(Application.dataPath + filePath, false); 187 | sw.WriteLine("namespace PhysSound{"); 188 | sw.WriteLine("//DO NOT EDIT THIS FILE DIRECTLY! Use the editor provided under Window/PhysSound."); 189 | sw.WriteLine("public class PhysSoundTypeList {"); 190 | 191 | sw.Write("public static string[] PhysSoundTypes = new string[" + tempTypes.Count + "] {"); 192 | 193 | for (int i = 0; i < tempTypes.Count; i++) 194 | { 195 | sw.Write("\"" + tempTypes[i] + "\""); 196 | 197 | if (i != tempTypes.Count - 1) 198 | sw.Write(","); 199 | } 200 | 201 | sw.WriteLine("};"); 202 | sw.WriteLine(""); 203 | 204 | sw.WriteLine("public static string GetKey(int index) { return (index >= PhysSoundTypes.Length) || (index < 0) ? \"\" : PhysSoundTypes[index]; }"); 205 | sw.WriteLine(""); 206 | 207 | sw.WriteLine("public static bool HasKey(int index) { return index < PhysSoundTypes.Length && index >= 0; }"); 208 | sw.WriteLine(""); 209 | 210 | sw.WriteLine("}"); 211 | sw.WriteLine("}"); 212 | 213 | sw.Close(); 214 | 215 | AssetDatabase.ImportAsset("Assets" + filePath); 216 | } 217 | 218 | void savePoolSize() 219 | { 220 | string oldFilePath; 221 | 222 | string[] assets = AssetDatabase.FindAssets("PhysSoundTempAudioPool"); 223 | if (assets.Length > 0) 224 | oldFilePath = AssetDatabase.GUIDToAssetPath(assets[0]).Split(new string[] { "Assets" }, System.StringSplitOptions.RemoveEmptyEntries)[0]; 225 | else 226 | { 227 | Debug.LogError("Could not find PhysSoundTempAudioPool.cs asset. Please reimport the package."); 228 | return; 229 | } 230 | 231 | string tempFilePath = Application.dataPath + "/temp.cs"; 232 | 233 | FileStream f = File.Create(tempFilePath); 234 | 235 | string line; 236 | StreamReader sr = new StreamReader(Application.dataPath + oldFilePath); 237 | StreamWriter sw = new StreamWriter(f); 238 | 239 | line = sr.ReadLine(); 240 | 241 | while (line != null) 242 | { 243 | if (line.Contains("public static int TempAudioPoolSize")) 244 | sw.WriteLine("\t\tpublic static int TempAudioPoolSize=" + tempPoolSize + ";"); 245 | else 246 | sw.WriteLine(line); 247 | 248 | line = sr.ReadLine(); 249 | } 250 | 251 | sw.Close(); 252 | sr.Close(); 253 | f.Close(); 254 | 255 | File.Copy(tempFilePath, Application.dataPath + oldFilePath, true); 256 | File.Delete(tempFilePath); 257 | 258 | AssetDatabase.ImportAsset("Assets" + oldFilePath); 259 | } 260 | 261 | void loadTypes() 262 | { 263 | string filePath; 264 | 265 | string[] assets = AssetDatabase.FindAssets("PhysSoundTypeList"); 266 | if (assets.Length > 0) 267 | filePath = AssetDatabase.GUIDToAssetPath(assets[0]).Split(new string[] { "Assets" }, System.StringSplitOptions.RemoveEmptyEntries)[0]; 268 | else 269 | { 270 | Debug.LogWarning("Could not find PhysSoundTypeList.cs asset. Create a new one at a desired location for it to be overwritten."); 271 | return; 272 | } 273 | 274 | StreamReader sr = new StreamReader(Application.dataPath + filePath); 275 | 276 | string input = sr.ReadLine(); 277 | 278 | while (input != null) 279 | { 280 | string trimmed = input.Trim(' '); 281 | if (trimmed.StartsWith("public static string[] PhysSoundTypes")) 282 | { 283 | int start = trimmed.IndexOf('{') + 1; 284 | int end = trimmed.IndexOf('}'); 285 | 286 | string[] values = trimmed.Substring(start, end - start).Split(','); 287 | 288 | for (int i = 0; i < values.Length; i++) 289 | { 290 | values[i] = values[i].Substring(1, values[i].Length - 2); 291 | } 292 | 293 | tempTypes = new List(values); 294 | break; 295 | } 296 | 297 | input = sr.ReadLine(); 298 | } 299 | 300 | sr.Close(); 301 | } 302 | 303 | void loadPoolSize() 304 | { 305 | string filePath; 306 | 307 | string[] assets = AssetDatabase.FindAssets("PhysSoundTempAudioPool"); 308 | if (assets.Length > 0) 309 | filePath = AssetDatabase.GUIDToAssetPath(assets[0]).Split(new string[] { "Assets" }, System.StringSplitOptions.RemoveEmptyEntries)[0]; 310 | else 311 | { 312 | Debug.LogError("Could not find PhysSoundTempAudioPool.cs asset. Please reimport the package."); 313 | return; 314 | } 315 | 316 | StreamReader sr = new StreamReader(Application.dataPath + filePath); 317 | 318 | string line = sr.ReadLine(); 319 | 320 | while (line != null) 321 | { 322 | if (line.Contains("public static int TempAudioPoolSize")) 323 | { 324 | string num = line.Split('=', ';')[1]; 325 | tempPoolSize = int.Parse(num); 326 | break; 327 | } 328 | 329 | line = sr.ReadLine(); 330 | } 331 | 332 | sr.Close(); 333 | 334 | EditorUtility.SetDirty(this); 335 | } 336 | 337 | #endregion 338 | } 339 | } -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Scripts/Editor/PhysSoundTypeEditor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: faf106e9a3829d74baf962938d1875f8 3 | labels: 4 | - Physics 5 | - Audio 6 | - Sound 7 | - Impact 8 | timeCreated: 1434915470 9 | licenseType: Free 10 | MonoImporter: 11 | serializedVersion: 2 12 | defaultReferences: [] 13 | executionOrder: 0 14 | icon: {instanceID: 0} 15 | userData: 16 | assetBundleName: 17 | assetBundleVariant: 18 | -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Scripts/PhysSoundBase.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace PhysSound 4 | { 5 | public abstract class PhysSoundBase : MonoBehaviour 6 | { 7 | public abstract PhysSoundMaterial GetPhysSoundMaterial(Vector3 contactPoint); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Scripts/PhysSoundBase.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 491955361a775dd48af1c1cf0f8c593b 3 | labels: 4 | - Physics 5 | - Sound 6 | - Audio 7 | - Impact 8 | timeCreated: 1431278103 9 | licenseType: Free 10 | MonoImporter: 11 | serializedVersion: 2 12 | defaultReferences: [] 13 | executionOrder: 0 14 | icon: {instanceID: 0} 15 | userData: 16 | assetBundleName: 17 | assetBundleVariant: 18 | -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Scripts/PhysSoundMaterial.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections.Generic; 3 | 4 | namespace PhysSound 5 | { 6 | public class PhysSoundMaterial : ScriptableObject 7 | { 8 | public int MaterialTypeKey; 9 | public int FallbackTypeIndex; 10 | public int FallbackTypeKey; 11 | public AnimationCurve VolumeCurve = AnimationCurve.Linear(0, 0, 1, 1); 12 | 13 | public Range RelativeVelocityThreshold; 14 | public float PitchRandomness = 0.1f; 15 | public bool TimeScalePitch; 16 | public float SlidePitchMod = 0.05f; 17 | public float SlideVolMultiplier = 1; 18 | public float ImpactNormalBias = 1; 19 | public float ScaleMod = 0.15f; 20 | 21 | public LayerMask CollisionMask = -1; 22 | 23 | public bool UseCollisionVelocity = true; 24 | public bool ScaleImpactVolume = true; 25 | 26 | public List AudioSets = new List(); 27 | private Dictionary audioSetDic; 28 | 29 | void OnEnable() 30 | { 31 | if (AudioSets.Count <= 0) 32 | return; 33 | 34 | audioSetDic = new Dictionary(); 35 | 36 | foreach (PhysSoundAudioSet audSet in AudioSets) 37 | { 38 | if (audioSetDic.ContainsKey(audSet.Key)) 39 | { 40 | Debug.LogError("PhysSound Material " + name + " has duplicate audio set for Material Type \"" + PhysSoundTypeList.GetKey(audSet.Key) + "\". It will not be used during runtime."); 41 | continue; 42 | } 43 | 44 | audioSetDic.Add(audSet.Key, audSet); 45 | } 46 | 47 | if (FallbackTypeIndex == 0) 48 | FallbackTypeKey = -1; 49 | else 50 | FallbackTypeKey = AudioSets[FallbackTypeIndex - 1].Key; 51 | } 52 | 53 | /// 54 | /// Gets the impact audio clip based on the given object that was hit, the velocity of the collision, the normal, and the contact point. 55 | /// 56 | public AudioClip GetImpactAudio(GameObject otherObject, Vector3 relativeVel, Vector3 norm, Vector3 contact, int layer = -1) 57 | { 58 | if (audioSetDic == null) 59 | return null; 60 | 61 | if (!CollideWith(otherObject)) 62 | return null; 63 | 64 | PhysSoundMaterial m = null; 65 | PhysSoundBase b = otherObject.GetComponent(); 66 | 67 | if (b) 68 | m = b.GetPhysSoundMaterial(contact); 69 | 70 | float velNorm = GetImpactVolume(relativeVel, norm); 71 | if (velNorm <= 0) 72 | return null; 73 | 74 | //Get sounds using collision velocity 75 | if (UseCollisionVelocity) 76 | { 77 | if (m) 78 | { 79 | PhysSoundAudioSet audSet; 80 | 81 | if (audioSetDic.TryGetValue(m.MaterialTypeKey, out audSet)) 82 | return audSet.GetImpact(velNorm, false); 83 | else if (FallbackTypeKey != -1) 84 | return audioSetDic[FallbackTypeKey].GetImpact(velNorm, false); 85 | } 86 | else if (FallbackTypeKey != -1) 87 | return audioSetDic[FallbackTypeKey].GetImpact(velNorm, false); 88 | } 89 | //Get sound randomly 90 | else 91 | { 92 | if (m) 93 | { 94 | PhysSoundAudioSet audSet; 95 | 96 | if (audioSetDic.TryGetValue(m.MaterialTypeKey, out audSet)) 97 | return audSet.GetImpact(0, true); 98 | else if (FallbackTypeKey != -1) 99 | return audioSetDic[FallbackTypeKey].GetImpact(0, true); 100 | } 101 | else if (FallbackTypeKey != -1) 102 | return audioSetDic[FallbackTypeKey].GetImpact(0, true); 103 | } 104 | 105 | return null; 106 | } 107 | 108 | /// 109 | /// Gets the volume of the slide audio based on the velocity and normal of the collision. 110 | /// 111 | public float GetSlideVolume(Vector3 relativeVel, Vector3 norm) 112 | { 113 | float slideAmt = norm == Vector3.zero ? 1 : 1 - Mathf.Abs(Vector3.Dot(norm, relativeVel)); 114 | float slideVel = (slideAmt) * relativeVel.magnitude * SlideVolMultiplier; 115 | 116 | return VolumeCurve.Evaluate(RelativeVelocityThreshold.Normalize(slideVel)); 117 | } 118 | 119 | /// 120 | /// Gets the volume of the impact audio based on the velocity and normal of the collision. 121 | /// 122 | public float GetImpactVolume(Vector3 relativeVel, Vector3 norm) 123 | { 124 | float impactAmt = norm == Vector3.zero ? 1 : Mathf.Abs(Vector3.Dot(norm.normalized, relativeVel.normalized)); 125 | float impactVel = (impactAmt + (1 - impactAmt) * (1 - ImpactNormalBias)) * relativeVel.magnitude; 126 | 127 | if (impactVel < RelativeVelocityThreshold.Min) 128 | return -1; 129 | 130 | return VolumeCurve.Evaluate(RelativeVelocityThreshold.Normalize(impactVel)); 131 | } 132 | 133 | /// 134 | /// Gets a random pitch within this material's pitch randomness range. 135 | /// 136 | public float GetRandomPitch() 137 | { 138 | return Random.Range(-PitchRandomness, PitchRandomness); 139 | } 140 | 141 | /// 142 | /// Gets the amount to multiply the pitch by based on the given scale and the ScaleMod property. 143 | /// 144 | public float GetScaleModPitch(Vector3 scale) 145 | { 146 | float val = (1 - ScaleMod) + (1.7320508075688772f / scale.magnitude) * ScaleMod; 147 | 148 | if (TimeScalePitch) 149 | val *= Time.timeScale; 150 | 151 | return val; 152 | } 153 | 154 | /// 155 | /// Gets the amount to multiply the volume by based on the given scale and the ScaleMod property. 156 | /// 157 | public float GetScaleModVolume(Vector3 scale) 158 | { 159 | return (1 - ScaleMod) + (scale.magnitude / 1.7320508075688772f) * ScaleMod; 160 | } 161 | 162 | /// 163 | /// Checks if this material has an audio set corresponding to the given key index. 164 | /// 165 | public bool HasAudioSet(int keyIndex) 166 | { 167 | foreach (PhysSoundAudioSet aud in AudioSets) 168 | { 169 | if (aud.CompareKeyIndex(keyIndex)) 170 | return true; 171 | } 172 | 173 | return false; 174 | } 175 | 176 | /// 177 | /// Gets the audio set corresponding to the given key index, if it exists. 178 | /// 179 | public PhysSoundAudioSet GetAudioSet(int keyIndex) 180 | { 181 | foreach (PhysSoundAudioSet aud in AudioSets) 182 | { 183 | if (aud.CompareKeyIndex(keyIndex)) 184 | return aud; 185 | } 186 | 187 | return null; 188 | } 189 | 190 | /// 191 | /// Gets the list of audio set names. (Used by the editor to display the list of potential fallback audio sets). 192 | /// 193 | public string[] GetFallbackAudioSets() 194 | { 195 | string[] names = new string[AudioSets.Count + 1]; 196 | names[0] = "None"; 197 | 198 | for (int i = 0; i < AudioSets.Count; i++) 199 | { 200 | names[i + 1] = PhysSoundTypeList.GetKey(AudioSets[i].Key); 201 | } 202 | 203 | return names; 204 | } 205 | 206 | /// 207 | /// Compares the layer of the given GameObject to this material's collision mask. 208 | /// 209 | public bool CollideWith(GameObject g) 210 | { 211 | return (1 << g.layer & CollisionMask.value) != 0; 212 | } 213 | } 214 | 215 | [System.Serializable] 216 | public class PhysSoundAudioSet 217 | { 218 | public int Key; 219 | public List Impacts = new List(); 220 | public AudioClip Slide; 221 | 222 | /// 223 | /// Gets the appropriate audio clip. Either based on the given velocity or picked at random. 224 | /// 225 | public AudioClip GetImpact(float vel, bool random) 226 | { 227 | if (Impacts.Count == 0) 228 | return null; 229 | 230 | if (random) 231 | { 232 | return Impacts[Random.Range(0, Impacts.Count)]; 233 | } 234 | else 235 | { 236 | int i = (int)(vel * (Impacts.Count - 1)); 237 | return Impacts[i]; 238 | } 239 | } 240 | 241 | /// 242 | /// Returns true if this Audio Set's key index is the same as the given key index. 243 | /// 244 | public bool CompareKeyIndex(int k) 245 | { 246 | return Key == k; 247 | } 248 | } 249 | } -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Scripts/PhysSoundMaterial.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d1a46b85acec488479294b28044c0b36 3 | labels: 4 | - Physics 5 | - Sound 6 | - Audio 7 | - Impact 8 | timeCreated: 1431275442 9 | licenseType: Free 10 | MonoImporter: 11 | serializedVersion: 2 12 | defaultReferences: [] 13 | executionOrder: 0 14 | icon: {instanceID: 0} 15 | userData: 16 | assetBundleName: 17 | assetBundleVariant: 18 | -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Scripts/PhysSoundObject.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections.Generic; 3 | 4 | namespace PhysSound 5 | { 6 | [AddComponentMenu("PhysSound/PhysSound Object")] 7 | public class PhysSoundObject : PhysSoundObjectBase 8 | { 9 | public List AudioContainers = new List(); 10 | private Dictionary _audioContainersDic; 11 | 12 | /// 13 | /// Initializes the PhysSoundObject. Use this if you adding a PhysSoundObject component to an object at runtime. 14 | /// 15 | public override void Initialize() 16 | { 17 | _r = GetComponent(); 18 | _r2D = GetComponent(); 19 | 20 | if (AutoCreateSources) 21 | { 22 | baseImpactVol = ImpactAudio.volume; 23 | baseImpactPitch = ImpactAudio.pitch; 24 | 25 | _audioContainersDic = new Dictionary(); 26 | AudioContainers = new List(); 27 | 28 | foreach (PhysSoundAudioSet audSet in SoundMaterial.AudioSets) 29 | { 30 | if (audSet.Slide == null) 31 | continue; 32 | 33 | PhysSoundAudioContainer audCont = new PhysSoundAudioContainer(audSet.Key); 34 | audCont.SlideAudio = PhysSoundTempAudioPool.GetAudioSourceCopy(ImpactAudio, this.gameObject); 35 | 36 | audCont.Initialize(this); 37 | _audioContainersDic.Add(audCont.KeyIndex, audCont); 38 | AudioContainers.Add(audCont); 39 | } 40 | 41 | ImpactAudio.loop = false; 42 | } 43 | else 44 | { 45 | if (ImpactAudio) 46 | { 47 | ImpactAudio.loop = false; 48 | baseImpactVol = ImpactAudio.volume; 49 | baseImpactPitch = ImpactAudio.pitch; 50 | } 51 | 52 | if (AudioContainers.Count > 0) 53 | { 54 | _audioContainersDic = new Dictionary(); 55 | 56 | foreach (PhysSoundAudioContainer audCont in AudioContainers) 57 | { 58 | if (!SoundMaterial.HasAudioSet(audCont.KeyIndex)) 59 | { 60 | Debug.LogError("PhysSound Object " + gameObject.name + " has an audio container for an invalid Material Type! Select this object in the hierarchy to update its audio container list."); 61 | continue; 62 | } 63 | 64 | if (PlayClipAtPoint) 65 | audCont.Initialize(this, ImpactAudio); 66 | else 67 | audCont.Initialize(this); 68 | 69 | _audioContainersDic.Add(audCont.KeyIndex, audCont); 70 | } 71 | } 72 | } 73 | 74 | if (PlayClipAtPoint) 75 | PhysSoundTempAudioPool.Create(); 76 | else if (ImpactAudio != null && !ImpactAudio.isActiveAndEnabled) 77 | ImpactAudio = PhysSoundTempAudioPool.GetAudioSourceCopy(ImpactAudio, gameObject); 78 | } 79 | 80 | void Update() 81 | { 82 | if (SoundMaterial == null) 83 | return; 84 | 85 | for (int i = 0; i < AudioContainers.Count; i++) 86 | AudioContainers[i].UpdateVolume(); 87 | 88 | if (ImpactAudio && !ImpactAudio.isPlaying) 89 | ImpactAudio.Stop(); 90 | 91 | _kinematicVelocity = (transform.position - _prevPosition) / Time.deltaTime; 92 | _prevPosition = transform.position; 93 | 94 | _kinematicAngularVelocity = Quaternion.Angle(_prevRotation, transform.rotation) / Time.deltaTime / 45f; 95 | _prevRotation = transform.rotation; 96 | } 97 | 98 | /// 99 | /// Enables or Disables this script along with its associated AudioSources. 100 | /// 101 | public override void SetEnabled(bool enable) 102 | { 103 | if (enable && this.enabled == false) 104 | { 105 | for (int i = 0; i < AudioContainers.Count; i++) 106 | { 107 | AudioContainers[i].Enable(); 108 | } 109 | 110 | ImpactAudio.enabled = true; 111 | this.enabled = true; 112 | } 113 | else if (!enable && this.enabled == true) 114 | { 115 | if (ImpactAudio) 116 | { 117 | ImpactAudio.Stop(); 118 | ImpactAudio.enabled = false; 119 | } 120 | 121 | for (int i = 0; i < AudioContainers.Count; i++) 122 | { 123 | AudioContainers[i].Disable(); 124 | } 125 | 126 | this.enabled = false; 127 | } 128 | } 129 | 130 | #region Main Functions 131 | 132 | private void setSlideTargetVolumes(GameObject otherObject, Vector3 relativeVelocity, Vector3 normal, Vector3 contactPoint, bool exit) 133 | { 134 | //log("Sliding! " + gameObject.name + " against " + otherObject.name + " - Relative Velocity: " + relativeVelocity + ", Normal: " + normal + ", Contact Point: " + contactPoint + ", Exit: " + exit); 135 | 136 | if (SoundMaterial == null || !this.enabled || SoundMaterial.AudioSets.Count == 0) 137 | { 138 | return; 139 | } 140 | 141 | PhysSoundMaterial m = null; 142 | PhysSoundBase b = otherObject == null ? null : otherObject.GetComponent(); 143 | 144 | if (b) 145 | { 146 | //Special case for sliding against a terrain 147 | if (b is PhysSoundTerrain) 148 | { 149 | PhysSoundTerrain terr = b as PhysSoundTerrain; 150 | Dictionary compDic = terr.GetComposition(contactPoint); 151 | 152 | foreach (PhysSoundAudioContainer c in _audioContainersDic.Values) 153 | { 154 | PhysSoundComposition comp; 155 | float mod = 0; 156 | 157 | if (compDic.TryGetValue(c.KeyIndex, out comp)) 158 | mod = comp.GetAverage(); 159 | 160 | c.SetTargetVolumeAndPitch(this.gameObject, otherObject, relativeVelocity, normal, exit, mod); 161 | } 162 | 163 | return; 164 | } 165 | else 166 | m = b.GetPhysSoundMaterial(contactPoint); 167 | } 168 | 169 | //General cases 170 | //If the other object has a PhysSound material 171 | if (m) 172 | { 173 | PhysSoundAudioContainer aud; 174 | 175 | if (_audioContainersDic.TryGetValue(m.MaterialTypeKey, out aud)) 176 | aud.SetTargetVolumeAndPitch(this.gameObject, otherObject, relativeVelocity, normal, exit); 177 | else if (!SoundMaterial.HasAudioSet(m.MaterialTypeKey) && SoundMaterial.FallbackTypeKey != -1 && _audioContainersDic.TryGetValue(SoundMaterial.FallbackTypeKey, out aud)) 178 | aud.SetTargetVolumeAndPitch(this.gameObject, otherObject, relativeVelocity, normal, exit); 179 | } 180 | //If it doesnt we set volumes based on the fallback setting of our material 181 | else 182 | { 183 | PhysSoundAudioContainer aud; 184 | 185 | if (SoundMaterial.FallbackTypeKey != -1 && _audioContainersDic.TryGetValue(SoundMaterial.FallbackTypeKey, out aud)) 186 | aud.SetTargetVolumeAndPitch(this.gameObject, otherObject, relativeVelocity, normal, exit); 187 | } 188 | } 189 | 190 | #endregion 191 | 192 | #region 3D Collision Messages 193 | 194 | Vector3 contactNormal, contactPoint, relativeVelocity; 195 | 196 | void OnCollisionEnter(Collision c) 197 | { 198 | if (SoundMaterial == null || !this.enabled || SoundMaterial.AudioSets.Count == 0) 199 | return; 200 | 201 | contactNormal = c.contacts[0].normal; 202 | contactPoint = c.contacts[0].point; 203 | relativeVelocity = c.relativeVelocity; 204 | 205 | playImpactSound(c.collider.gameObject, relativeVelocity, contactNormal, contactPoint); 206 | 207 | _setPrevVelocity = true; 208 | } 209 | 210 | 211 | void OnCollisionStay(Collision c) 212 | { 213 | if (SoundMaterial == null || !this.enabled || SoundMaterial.AudioSets.Count == 0 || _audioContainersDic == null) 214 | return; 215 | 216 | if (_setPrevVelocity) 217 | { 218 | _prevVelocity = _r.velocity; 219 | _setPrevVelocity = false; 220 | } 221 | 222 | Vector3 deltaVel = _r.velocity - _prevVelocity; 223 | 224 | if (c.contacts.Length > 0) 225 | { 226 | contactNormal = c.contacts[0].normal; 227 | contactPoint = c.contacts[0].point; 228 | } 229 | 230 | relativeVelocity = c.relativeVelocity; 231 | 232 | playImpactSound(c.collider.gameObject, deltaVel, contactNormal, contactPoint); 233 | setSlideTargetVolumes(c.collider.gameObject, relativeVelocity, contactNormal, contactPoint, false); 234 | 235 | _prevVelocity = _r.velocity; 236 | } 237 | 238 | void OnCollisionExit(Collision c) 239 | { 240 | if (SoundMaterial == null || !this.enabled || SoundMaterial.AudioSets.Count == 0 || _audioContainersDic == null) 241 | return; 242 | 243 | setSlideTargetVolumes(c.collider.gameObject, Vector3.zero, Vector3.zero, transform.position, true); 244 | _setPrevVelocity = true; 245 | } 246 | 247 | #endregion 248 | 249 | #region 3D Trigger Messages 250 | 251 | void OnTriggerEnter(Collider c) 252 | { 253 | if (SoundMaterial == null || !this.enabled || SoundMaterial.AudioSets.Count == 0 || !HitsTriggers) 254 | return; 255 | 256 | playImpactSound(c.gameObject, TotalKinematicVelocity, Vector3.zero, c.transform.position); 257 | } 258 | 259 | void OnTriggerStay(Collider c) 260 | { 261 | if (SoundMaterial == null || !this.enabled || SoundMaterial.AudioSets.Count == 0 || _audioContainersDic == null || !HitsTriggers) 262 | return; 263 | 264 | setSlideTargetVolumes(c.gameObject, TotalKinematicVelocity, Vector3.zero, c.transform.position, false); 265 | } 266 | 267 | void OnTriggerExit(Collider c) 268 | { 269 | if (SoundMaterial == null || !this.enabled || SoundMaterial.AudioSets.Count == 0 || _audioContainersDic == null || !HitsTriggers) 270 | return; 271 | 272 | setSlideTargetVolumes(c.gameObject, TotalKinematicVelocity, Vector3.zero, c.transform.position, true); 273 | } 274 | 275 | #endregion 276 | 277 | #region 2D Collision Messages 278 | 279 | void OnCollisionEnter2D(Collision2D c) 280 | { 281 | if (SoundMaterial == null || !this.enabled || SoundMaterial.AudioSets.Count == 0) 282 | return; 283 | 284 | playImpactSound(c.collider.gameObject, c.relativeVelocity, c.contacts[0].normal, c.contacts[0].point); 285 | 286 | _setPrevVelocity = true; 287 | } 288 | 289 | void OnCollisionStay2D(Collision2D c) 290 | { 291 | if (SoundMaterial == null || !this.enabled || SoundMaterial.AudioSets.Count == 0 || _audioContainersDic == null) 292 | return; 293 | 294 | if (_setPrevVelocity) 295 | { 296 | _prevVelocity = _r2D.velocity; 297 | _setPrevVelocity = false; 298 | } 299 | 300 | Vector3 deltaVel = _r2D.velocity - (Vector2)_prevVelocity; 301 | 302 | playImpactSound(c.collider.gameObject, deltaVel, c.contacts[0].normal, c.contacts[0].point); 303 | setSlideTargetVolumes(c.collider.gameObject, c.relativeVelocity, c.contacts[0].normal, c.contacts[0].point, false); 304 | 305 | _prevVelocity = _r2D.velocity; 306 | } 307 | 308 | void OnCollisionExit2D(Collision2D c) 309 | { 310 | if (SoundMaterial == null || !this.enabled || SoundMaterial.AudioSets.Count == 0 || _audioContainersDic == null) 311 | return; 312 | 313 | setSlideTargetVolumes(c.collider.gameObject, c.relativeVelocity, Vector3.up, transform.position, true); 314 | 315 | _setPrevVelocity = true; 316 | } 317 | 318 | #endregion 319 | 320 | #region 2D Trigger Messages 321 | 322 | void OnTriggerEnter2D(Collider2D c) 323 | { 324 | if (SoundMaterial == null || !this.enabled || SoundMaterial.AudioSets.Count == 0) 325 | return; 326 | 327 | playImpactSound(c.gameObject, TotalKinematicVelocity, Vector3.zero, c.transform.position); 328 | } 329 | 330 | void OnTriggerStay2D(Collider2D c) 331 | { 332 | if (SoundMaterial == null || !this.enabled || SoundMaterial.AudioSets.Count == 0 || _audioContainersDic == null) 333 | return; 334 | 335 | setSlideTargetVolumes(c.gameObject, TotalKinematicVelocity, Vector3.zero, c.transform.position, false); 336 | } 337 | 338 | void OnTriggerExit2D(Collider2D c) 339 | { 340 | if (SoundMaterial == null || !this.enabled || SoundMaterial.AudioSets.Count == 0 || _audioContainersDic == null) 341 | return; 342 | 343 | setSlideTargetVolumes(c.gameObject, TotalKinematicVelocity, Vector3.zero, c.transform.position, true); 344 | } 345 | 346 | #endregion 347 | 348 | #region Editor 349 | 350 | public bool HasAudioContainer(int keyIndex) 351 | { 352 | foreach (PhysSoundAudioContainer aud in AudioContainers) 353 | { 354 | if (aud.CompareKeyIndex(keyIndex)) 355 | return true; 356 | } 357 | 358 | return false; 359 | } 360 | 361 | public void AddAudioContainer(int keyIndex) 362 | { 363 | AudioContainers.Add(new PhysSoundAudioContainer(keyIndex)); 364 | } 365 | 366 | public void RemoveAudioContainer(int keyIndex) 367 | { 368 | for (int i = 0; i < AudioContainers.Count; i++) 369 | { 370 | if (AudioContainers[i].KeyIndex == keyIndex) 371 | { 372 | AudioContainers.RemoveAt(i); 373 | return; 374 | } 375 | } 376 | } 377 | 378 | #endregion 379 | } 380 | 381 | [System.Serializable] 382 | public class PhysSoundAudioContainer 383 | { 384 | public int KeyIndex; 385 | public AudioSource SlideAudio; 386 | 387 | private PhysSoundObject physSoundObject; 388 | private float _targetVolume; 389 | private float _baseVol, _basePitch, _basePitchRand; 390 | 391 | private int _lastFrame; 392 | private bool _lastExit; 393 | 394 | private AudioSource currAudioSource; 395 | 396 | private PhysSoundMaterial soundMaterial 397 | { 398 | get { return physSoundObject.SoundMaterial; } 399 | } 400 | 401 | public PhysSoundAudioContainer(int k) 402 | { 403 | KeyIndex = k; 404 | } 405 | 406 | /// 407 | /// Initializes this Audio Container for no audio pooling. Will do nothing if SlideAudio is not assigned. 408 | /// 409 | public void Initialize(PhysSoundObject obj) 410 | { 411 | if (SlideAudio == null) 412 | return; 413 | 414 | physSoundObject = obj; 415 | 416 | _baseVol = SlideAudio.volume; 417 | _basePitch = SlideAudio.pitch; 418 | _basePitchRand = _basePitch; 419 | 420 | SlideAudio.clip = soundMaterial.GetAudioSet(KeyIndex).Slide; 421 | SlideAudio.loop = true; 422 | SlideAudio.volume = 0; 423 | 424 | currAudioSource = SlideAudio; 425 | } 426 | 427 | /// 428 | /// Initializes this Audio Container for audio pooling. 429 | /// 430 | public void Initialize(PhysSoundObject obj, AudioSource template) 431 | { 432 | physSoundObject = obj; 433 | SlideAudio = template; 434 | 435 | _baseVol = template.volume; 436 | _basePitch = template.pitch; 437 | _basePitchRand = _basePitch; 438 | } 439 | 440 | /// 441 | /// Sets the target volume and pitch of the sliding sound effect based on the given object that was hit, velocity, and normal. 442 | /// 443 | public void SetTargetVolumeAndPitch(GameObject parentObject, GameObject otherObject, Vector3 relativeVelocity, Vector3 normal, bool exit, float mod = 1) 444 | { 445 | if (SlideAudio == null) 446 | return; 447 | 448 | float vol = exit || !soundMaterial.CollideWith(otherObject) ? 0 : soundMaterial.GetSlideVolume(relativeVelocity, normal) * _baseVol * mod; 449 | 450 | if (_lastFrame == Time.frameCount) 451 | { 452 | if (_lastExit != exit || _targetVolume < vol) 453 | _targetVolume = vol; 454 | } 455 | else 456 | _targetVolume = vol; 457 | 458 | if (physSoundObject.PlayClipAtPoint && currAudioSource == null && _targetVolume > 0.001f) 459 | { 460 | _basePitchRand = _basePitch * soundMaterial.GetScaleModPitch(parentObject.transform.localScale) + soundMaterial.GetRandomPitch(); 461 | currAudioSource = PhysSoundTempAudioPool.Instance.GetSource(SlideAudio); 462 | 463 | if (currAudioSource) 464 | { 465 | currAudioSource.clip = soundMaterial.GetAudioSet(KeyIndex).Slide; 466 | currAudioSource.volume = _targetVolume; 467 | currAudioSource.loop = true; 468 | currAudioSource.Play(); 469 | } 470 | } 471 | else if (currAudioSource && !currAudioSource.isPlaying) 472 | { 473 | _basePitchRand = _basePitch * soundMaterial.GetScaleModPitch(parentObject.transform.localScale) + soundMaterial.GetRandomPitch(); 474 | currAudioSource.loop = true; 475 | currAudioSource.volume = _targetVolume; 476 | currAudioSource.Play(); 477 | } 478 | 479 | if (currAudioSource) 480 | currAudioSource.pitch = _basePitchRand + relativeVelocity.magnitude * soundMaterial.SlidePitchMod; 481 | 482 | if (soundMaterial.TimeScalePitch) 483 | currAudioSource.pitch *= Time.timeScale; 484 | 485 | _lastExit = exit; 486 | _lastFrame = Time.frameCount; 487 | } 488 | 489 | /// 490 | /// Updates the associated AudioSource to match the target volume and pitch. 491 | /// 492 | public void UpdateVolume() 493 | { 494 | if (SlideAudio == null || currAudioSource == null) 495 | return; 496 | 497 | currAudioSource.transform.position = physSoundObject.transform.position; 498 | currAudioSource.volume = Mathf.MoveTowards(currAudioSource.volume, _targetVolume, 0.1f); 499 | 500 | if (currAudioSource.volume < 0.001f) 501 | { 502 | if (physSoundObject.PlayClipAtPoint) 503 | { 504 | PhysSoundTempAudioPool.Instance.ReleaseSource(currAudioSource); 505 | currAudioSource = null; 506 | } 507 | else 508 | { 509 | currAudioSource.Stop(); 510 | } 511 | } 512 | } 513 | 514 | /// 515 | /// Returns true if this Audio Container's key index is the same as the given key index. 516 | /// 517 | public bool CompareKeyIndex(int k) 518 | { 519 | return k == KeyIndex; 520 | } 521 | 522 | /// 523 | /// Disables the associated AudioSource. 524 | /// 525 | public void Disable() 526 | { 527 | if (SlideAudio) 528 | { 529 | SlideAudio.Stop(); 530 | SlideAudio.enabled = false; 531 | } 532 | } 533 | 534 | /// 535 | /// Enables the associated AudioSource. 536 | /// 537 | public void Enable() 538 | { 539 | if (SlideAudio) 540 | { 541 | SlideAudio.enabled = true; 542 | } 543 | } 544 | } 545 | } -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Scripts/PhysSoundObject.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ddb9295558debd040818c61f2f32bdc5 3 | labels: 4 | - Physics 5 | - Sound 6 | - Audio 7 | - Impact 8 | timeCreated: 1432441609 9 | licenseType: Free 10 | MonoImporter: 11 | serializedVersion: 2 12 | defaultReferences: [] 13 | executionOrder: 0 14 | icon: {instanceID: 0} 15 | userData: 16 | assetBundleName: 17 | assetBundleVariant: 18 | -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Scripts/PhysSoundObjectBase.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace PhysSound 4 | { 5 | public class PhysSoundObjectBase : PhysSoundBase 6 | { 7 | public PhysSoundMaterial SoundMaterial; 8 | 9 | public bool AutoCreateSources; 10 | public bool PlayClipAtPoint; 11 | public bool HitsTriggers; 12 | 13 | public AudioSource ImpactAudio; 14 | 15 | protected float baseImpactVol, baseImpactPitch; 16 | 17 | protected Vector3 _prevVelocity; 18 | protected bool _setPrevVelocity = true; 19 | 20 | protected Vector3 _prevPosition; 21 | protected Vector3 _kinematicVelocity; 22 | protected Quaternion _prevRotation; 23 | protected float _kinematicAngularVelocity; 24 | 25 | protected int _lastFrame; 26 | 27 | protected Rigidbody _r; 28 | protected Rigidbody2D _r2D; 29 | 30 | protected Vector3 TotalKinematicVelocity 31 | { 32 | get { return _kinematicVelocity + (Vector3.one * _kinematicAngularVelocity); } 33 | } 34 | 35 | 36 | void Start() 37 | { 38 | if (SoundMaterial == null) 39 | return; 40 | 41 | Initialize(); 42 | } 43 | 44 | /// 45 | /// Gets the PhysSound Material of this object. 46 | /// 47 | public override PhysSoundMaterial GetPhysSoundMaterial(Vector3 contactPoint) 48 | { 49 | return SoundMaterial; 50 | } 51 | 52 | public virtual void Initialize() { } 53 | 54 | public virtual void SetEnabled(bool enabled) { } 55 | 56 | protected void playImpactSound(GameObject otherObject, Vector3 relativeVelocity, Vector3 normal, Vector3 contactPoint) 57 | { 58 | if (SoundMaterial == null || !this.enabled || SoundMaterial.AudioSets.Count == 0 || Time.frameCount == _lastFrame) 59 | { 60 | return; 61 | } 62 | 63 | if (ImpactAudio) 64 | { 65 | AudioClip a = SoundMaterial.GetImpactAudio(otherObject, relativeVelocity, normal, contactPoint); 66 | 67 | if (a) 68 | { 69 | float pitch = baseImpactPitch * SoundMaterial.GetScaleModPitch(transform.localScale) + SoundMaterial.GetRandomPitch(); 70 | float vol = baseImpactVol * SoundMaterial.GetScaleModVolume(transform.localScale) * SoundMaterial.GetImpactVolume(relativeVelocity, normal); 71 | 72 | if (PlayClipAtPoint) 73 | { 74 | PhysSoundTempAudioPool.Instance.PlayClip(a, transform.position, ImpactAudio, SoundMaterial.ScaleImpactVolume ? vol : ImpactAudio.volume, pitch); 75 | } 76 | else 77 | { 78 | ImpactAudio.pitch = pitch; 79 | if (SoundMaterial.ScaleImpactVolume) 80 | ImpactAudio.volume = vol; 81 | 82 | ImpactAudio.clip = a; 83 | ImpactAudio.Play(); 84 | } 85 | 86 | _lastFrame = Time.frameCount; 87 | } 88 | } 89 | } 90 | } 91 | } -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Scripts/PhysSoundObjectBase.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7148ab476afc6254489966e0e8058a40 3 | timeCreated: 1489955795 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Scripts/PhysSoundObjectLite.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections.Generic; 3 | 4 | namespace PhysSound 5 | { 6 | [AddComponentMenu("PhysSound/PhysSound Object Lite")] 7 | public class PhysSoundObjectLite : PhysSoundObjectBase 8 | { 9 | void Update() 10 | { 11 | if (SoundMaterial == null) 12 | return; 13 | 14 | if (ImpactAudio && !ImpactAudio.isPlaying) 15 | ImpactAudio.Stop(); 16 | 17 | _kinematicVelocity = (transform.position - _prevPosition) / Time.deltaTime; 18 | _prevPosition = transform.position; 19 | 20 | _kinematicAngularVelocity = Quaternion.Angle(_prevRotation, transform.rotation) / Time.deltaTime / 45f; 21 | _prevRotation = transform.rotation; 22 | } 23 | 24 | /// 25 | /// Initializes the PhysSoundObject. Use this if you adding a PhysSoundObject component to an object at runtime. 26 | /// 27 | public override void Initialize() 28 | { 29 | _r = GetComponent(); 30 | _r2D = GetComponent(); 31 | 32 | if (AutoCreateSources) 33 | { 34 | baseImpactVol = ImpactAudio.volume; 35 | baseImpactPitch = ImpactAudio.pitch; 36 | 37 | ImpactAudio.loop = false; 38 | } 39 | else if (ImpactAudio) 40 | { 41 | ImpactAudio.loop = false; 42 | baseImpactVol = ImpactAudio.volume; 43 | baseImpactPitch = ImpactAudio.pitch; 44 | } 45 | 46 | if (PlayClipAtPoint) 47 | PhysSoundTempAudioPool.Create(); 48 | else if (ImpactAudio != null && !ImpactAudio.isActiveAndEnabled) 49 | ImpactAudio = PhysSoundTempAudioPool.GetAudioSourceCopy(ImpactAudio, gameObject); 50 | } 51 | 52 | /// 53 | /// Enables or Disables this script along with its associated AudioSources. 54 | /// 55 | public override void SetEnabled(bool enable) 56 | { 57 | if (enable && this.enabled == false) 58 | { 59 | ImpactAudio.enabled = true; 60 | this.enabled = true; 61 | } 62 | else if (!enable && this.enabled == true) 63 | { 64 | if (ImpactAudio) 65 | { 66 | ImpactAudio.Stop(); 67 | ImpactAudio.enabled = false; 68 | } 69 | 70 | this.enabled = false; 71 | } 72 | } 73 | 74 | #region 3D Collision Messages 75 | 76 | Vector3 contactNormal, contactPoint, relativeVelocity; 77 | 78 | void OnCollisionEnter(Collision c) 79 | { 80 | if (SoundMaterial == null || !this.enabled || SoundMaterial.AudioSets.Count == 0) 81 | return; 82 | 83 | contactNormal = c.contacts[0].normal; 84 | contactPoint = c.contacts[0].point; 85 | relativeVelocity = c.relativeVelocity; 86 | 87 | playImpactSound(c.collider.gameObject, relativeVelocity, contactNormal, contactPoint); 88 | 89 | _setPrevVelocity = true; 90 | } 91 | 92 | #endregion 93 | 94 | #region 3D Trigger Messages 95 | 96 | void OnTriggerEnter(Collider c) 97 | { 98 | if (SoundMaterial == null || !this.enabled || SoundMaterial.AudioSets.Count == 0 || !HitsTriggers) 99 | return; 100 | 101 | playImpactSound(c.gameObject, TotalKinematicVelocity, Vector3.zero, c.transform.position); 102 | } 103 | 104 | #endregion 105 | 106 | #region 2D Collision Messages 107 | 108 | void OnCollisionEnter2D(Collision2D c) 109 | { 110 | if (SoundMaterial == null || !this.enabled || SoundMaterial.AudioSets.Count == 0) 111 | return; 112 | 113 | playImpactSound(c.collider.gameObject, c.relativeVelocity, c.contacts[0].normal, c.contacts[0].point); 114 | 115 | _setPrevVelocity = true; 116 | } 117 | 118 | #endregion 119 | 120 | #region 2D Trigger Messages 121 | 122 | void OnTriggerEnter2D(Collider2D c) 123 | { 124 | if (SoundMaterial == null || !this.enabled || SoundMaterial.AudioSets.Count == 0) 125 | return; 126 | 127 | playImpactSound(c.gameObject, TotalKinematicVelocity, Vector3.zero, c.transform.position); 128 | } 129 | 130 | #endregion 131 | } 132 | } -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Scripts/PhysSoundObjectLite.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 153334e5978d5554ba1cb364e1de3e57 3 | labels: 4 | - Physics 5 | - Sound 6 | - Audio 7 | - Impact 8 | timeCreated: 1489952953 9 | licenseType: Free 10 | MonoImporter: 11 | serializedVersion: 2 12 | defaultReferences: [] 13 | executionOrder: 0 14 | icon: {instanceID: 0} 15 | userData: 16 | assetBundleName: 17 | assetBundleVariant: 18 | -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Scripts/PhysSoundTempAudio.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace PhysSound 4 | { 5 | public class PhysSoundTempAudio : MonoBehaviour 6 | { 7 | private AudioSource audioSource; 8 | public AudioSource Audio 9 | { 10 | get { return audioSource; } 11 | } 12 | 13 | public void Initialize(PhysSoundTempAudioPool pool) 14 | { 15 | audioSource = gameObject.AddComponent(); 16 | 17 | transform.SetParent(pool.transform); 18 | gameObject.SetActive(false); 19 | } 20 | 21 | public void PlayClip(AudioClip clip, Vector3 point, AudioSource template, float volume, float pitch) 22 | { 23 | PhysSoundTempAudioPool.CopyAudioSource(template, audioSource); 24 | 25 | transform.position = point; 26 | 27 | audioSource.clip = clip; 28 | audioSource.volume = volume; 29 | audioSource.pitch = pitch; 30 | 31 | gameObject.SetActive(true); 32 | 33 | audioSource.Play(); 34 | } 35 | 36 | void Update() 37 | { 38 | if (!audioSource.isPlaying) 39 | { 40 | transform.position = Vector3.zero; 41 | gameObject.SetActive(false); 42 | } 43 | } 44 | } 45 | } -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Scripts/PhysSoundTempAudio.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7ab2dae0165ff71449b26623bdb9298e 3 | timeCreated: 1456614159 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Scripts/PhysSoundTempAudioPool.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Reflection; 3 | using System; 4 | 5 | namespace PhysSound 6 | { 7 | public class PhysSoundTempAudioPool : MonoBehaviour 8 | { 9 | public static int TempAudioPoolSize=100; 10 | 11 | public static PhysSoundTempAudioPool Instance; 12 | 13 | public static void Create() 14 | { 15 | if (Instance != null) 16 | return; 17 | 18 | GameObject g = new GameObject("PhysSound Temp Audio Pool"); 19 | PhysSoundTempAudioPool p = g.AddComponent(); 20 | p.Initialize(); 21 | } 22 | 23 | /// 24 | /// Creates a new AudioSource component on the given GameObject, using the given template's properties. 25 | /// 26 | public static AudioSource GetAudioSourceCopy(AudioSource template, GameObject g) 27 | { 28 | AudioSource a = g.AddComponent(); 29 | 30 | if (!template) 31 | return a; 32 | 33 | CopyAudioSource(template, a); 34 | 35 | return a; 36 | } 37 | 38 | /// 39 | /// Applies the properties of the template AudioSource to the target AudioSource. 40 | /// 41 | public static void CopyAudioSource(AudioSource template, AudioSource target) 42 | { 43 | target.bypassEffects = template.bypassEffects; 44 | target.bypassListenerEffects = template.bypassListenerEffects; 45 | target.bypassReverbZones = template.bypassReverbZones; 46 | target.dopplerLevel = template.dopplerLevel; 47 | target.ignoreListenerPause = template.ignoreListenerPause; 48 | target.ignoreListenerVolume = template.ignoreListenerVolume; 49 | target.loop = template.loop; 50 | target.maxDistance = template.maxDistance; 51 | target.minDistance = template.minDistance; 52 | target.mute = template.mute; 53 | target.outputAudioMixerGroup = template.outputAudioMixerGroup; 54 | target.panStereo = template.panStereo; 55 | target.pitch = template.pitch; 56 | target.playOnAwake = template.playOnAwake; 57 | target.priority = template.priority; 58 | target.reverbZoneMix = template.reverbZoneMix; 59 | target.rolloffMode = template.rolloffMode; 60 | target.spatialBlend = template.spatialBlend; 61 | target.spread = template.spread; 62 | target.time = template.time; 63 | target.timeSamples = template.timeSamples; 64 | target.velocityUpdateMode = template.velocityUpdateMode; 65 | target.volume = template.volume; 66 | } 67 | 68 | private PhysSoundTempAudio[] audioSources; 69 | private int lastAvailable; 70 | 71 | public void Initialize() 72 | { 73 | Instance = this; 74 | 75 | audioSources = new PhysSoundTempAudio[TempAudioPoolSize]; 76 | 77 | for (int i = 0; i < TempAudioPoolSize; i++) 78 | { 79 | GameObject g = new GameObject("Temp Audio Source"); 80 | PhysSoundTempAudio a = g.AddComponent(); 81 | a.Initialize(this); 82 | 83 | audioSources[i] = a; 84 | } 85 | } 86 | 87 | public void PlayClip(AudioClip clip, Vector3 point, AudioSource template, float volume, float pitch) 88 | { 89 | int checkedIndices = 0; 90 | int i = lastAvailable; 91 | 92 | while (checkedIndices < TempAudioPoolSize) 93 | { 94 | PhysSoundTempAudio a = audioSources[i]; 95 | 96 | if (!a.gameObject.activeInHierarchy) 97 | { 98 | a.PlayClip(clip, point, template, volume, pitch); 99 | 100 | lastAvailable = i; 101 | return; 102 | } 103 | 104 | i++; 105 | checkedIndices++; 106 | 107 | if (i >= TempAudioPoolSize) 108 | i = 0; 109 | } 110 | } 111 | 112 | public AudioSource GetSource(AudioSource template) 113 | { 114 | int checkedIndices = 0; 115 | int i = lastAvailable; 116 | 117 | while (checkedIndices < TempAudioPoolSize) 118 | { 119 | PhysSoundTempAudio a = audioSources[i]; 120 | 121 | if (!a.gameObject.activeInHierarchy) 122 | { 123 | CopyAudioSource(template, a.Audio); 124 | a.gameObject.SetActive(true); 125 | lastAvailable = i; 126 | return a.Audio; 127 | } 128 | 129 | i++; 130 | checkedIndices++; 131 | 132 | if (i >= TempAudioPoolSize) 133 | i = 0; 134 | } 135 | 136 | return null; 137 | } 138 | 139 | public void ReleaseSource(AudioSource a) 140 | { 141 | a.Stop(); 142 | } 143 | } 144 | } 145 | -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Scripts/PhysSoundTempAudioPool.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 38c5d2aa4ec230a48a6528251486010a 3 | timeCreated: 1456607846 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Scripts/PhysSoundTerrain.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections.Generic; 3 | 4 | namespace PhysSound 5 | { 6 | [AddComponentMenu("PhysSound/PhysSound Terrain")] 7 | public class PhysSoundTerrain : PhysSoundBase 8 | { 9 | public Terrain Terrain; 10 | public List SoundMaterials = new List(); 11 | Dictionary compDic = new Dictionary(); 12 | 13 | TerrainData terrainData; 14 | Vector3 terrainPos; 15 | 16 | void Start() 17 | { 18 | terrainData = Terrain.terrainData; 19 | terrainPos = Terrain.transform.position; 20 | 21 | foreach (PhysSoundMaterial mat in SoundMaterials) 22 | { 23 | if (!compDic.ContainsKey(mat.MaterialTypeKey)) 24 | compDic.Add(mat.MaterialTypeKey, new PhysSoundComposition(mat.MaterialTypeKey)); 25 | } 26 | } 27 | 28 | /// 29 | /// Gets the most prominent PhysSound Material at the given point on the terrain. 30 | /// 31 | public override PhysSoundMaterial GetPhysSoundMaterial(Vector3 contactPoint) 32 | { 33 | int dominantIndex = getDominantTexture(contactPoint); 34 | 35 | if (dominantIndex < SoundMaterials.Count && SoundMaterials[dominantIndex] != null) 36 | return SoundMaterials[dominantIndex]; 37 | 38 | return null; 39 | } 40 | 41 | /// 42 | /// Gets the composition of PhysSound Materials at the given point on the terrain. 43 | /// 44 | public Dictionary GetComposition(Vector3 contactPoint) 45 | { 46 | foreach (PhysSoundComposition c in compDic.Values) 47 | c.Reset(); 48 | 49 | float[] mix = getTextureMix(contactPoint); 50 | 51 | for (int i = 0; i < mix.Length; i++) 52 | { 53 | if (i >= SoundMaterials.Count) 54 | break; 55 | 56 | if (SoundMaterials[i] == null) 57 | continue; 58 | 59 | PhysSoundComposition comp; 60 | 61 | if (compDic.TryGetValue(SoundMaterials[i].MaterialTypeKey, out comp)) 62 | { 63 | comp.Add(mix[i]); 64 | } 65 | } 66 | 67 | return compDic; 68 | } 69 | 70 | private float[] getTextureMix(Vector3 worldPos) 71 | { 72 | int mapX = (int)(((worldPos.x - terrainPos.x) / terrainData.size.x) * terrainData.alphamapWidth); 73 | int mapZ = (int)(((worldPos.z - terrainPos.z) / terrainData.size.z) * terrainData.alphamapHeight); 74 | 75 | float[,,] splatmapData = terrainData.GetAlphamaps(mapX, mapZ, 1, 1); 76 | 77 | float[] cellMix = new float[splatmapData.GetUpperBound(2) + 1]; 78 | 79 | for (int i = 0; i < cellMix.Length; i++) 80 | { 81 | cellMix[i] = splatmapData[0, 0, i]; 82 | } 83 | 84 | return cellMix; 85 | } 86 | 87 | private int getDominantTexture(Vector3 worldPos) 88 | { 89 | float[] mix = getTextureMix(worldPos); 90 | 91 | float maxMix = 0; 92 | int maxMixIndex = 0; 93 | 94 | for (int j = 0; j < mix.Length; j++) 95 | { 96 | if (mix[j] > maxMix) 97 | { 98 | maxMixIndex = j; 99 | maxMix = mix[j]; 100 | } 101 | } 102 | 103 | return maxMixIndex; 104 | } 105 | } 106 | 107 | public class PhysSoundComposition 108 | { 109 | public int KeyIndex; 110 | public float Value; 111 | public int Count; 112 | 113 | public PhysSoundComposition(int key) 114 | { 115 | KeyIndex = key; 116 | } 117 | 118 | public void Reset() 119 | { 120 | Value = 0; 121 | Count = 0; 122 | } 123 | 124 | public void Add(float val) 125 | { 126 | Value += val; 127 | Count++; 128 | } 129 | 130 | public float GetAverage() 131 | { 132 | return Value / Count; 133 | } 134 | } 135 | } -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Scripts/PhysSoundTerrain.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2c99c62bd3cd5874cbb4de411e40b4a8 3 | labels: 4 | - Physics 5 | - Sound 6 | - Audio 7 | - Impact 8 | timeCreated: 1432440771 9 | licenseType: Free 10 | MonoImporter: 11 | serializedVersion: 2 12 | defaultReferences: [] 13 | executionOrder: 0 14 | icon: {instanceID: 0} 15 | userData: 16 | assetBundleName: 17 | assetBundleVariant: 18 | -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Scripts/PhysSoundTypeList.cs: -------------------------------------------------------------------------------- 1 | namespace PhysSound{ 2 | //DO NOT EDIT THIS FILE DIRECTLY! Use the editor provided under Window/PhysSound. 3 | public class PhysSoundTypeList { 4 | public static string[] PhysSoundTypes = new string[3] {"Hard","Soft","Other"}; 5 | 6 | public static string GetKey(int index) { return (index >= PhysSoundTypes.Length) || (index < 0) ? "" : PhysSoundTypes[index]; } 7 | 8 | public static bool HasKey(int index) { return index < PhysSoundTypes.Length && index >= 0; } 9 | 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Scripts/PhysSoundTypeList.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 78d7742e5be23fe41aa89d5ba4e82589 3 | labels: 4 | - Physics 5 | - Audio 6 | - Sound 7 | - Impact 8 | timeCreated: 1434921889 9 | licenseType: Free 10 | MonoImporter: 11 | serializedVersion: 2 12 | defaultReferences: [] 13 | executionOrder: 0 14 | icon: {instanceID: 0} 15 | userData: 16 | assetBundleName: 17 | assetBundleVariant: 18 | -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Scripts/Utilities/FoldoutList.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections; 3 | using System.Collections.Generic; 4 | 5 | namespace PhysSound 6 | { 7 | [System.Serializable] 8 | public class FoldoutList 9 | { 10 | [SerializeField] 11 | public List foldouts = new List(); 12 | [SerializeField] 13 | public bool mainFoldout; 14 | [SerializeField] 15 | public Vector2 scrollPos; 16 | 17 | public bool this[int index] 18 | { 19 | get { return foldouts[index]; } 20 | set { foldouts[index] = value; } 21 | } 22 | 23 | public int Count 24 | { 25 | get { return foldouts.Count; } 26 | } 27 | 28 | public void Add(bool value) 29 | { 30 | foldouts.Add(value); 31 | } 32 | 33 | public void RemoveAt(int index) 34 | { 35 | foldouts.RemoveAt(index); 36 | } 37 | 38 | public void Reset() 39 | { 40 | for (int i = 0; i < foldouts.Count; i++) 41 | { 42 | foldouts[i] = false; 43 | } 44 | } 45 | 46 | public void Update(int count, bool defaultValue) 47 | { 48 | while (foldouts.Count > count) 49 | foldouts.RemoveAt(0); 50 | 51 | for (int i = foldouts.Count; i < count; i++) 52 | { 53 | foldouts.Add(defaultValue); 54 | } 55 | } 56 | 57 | public void Isolate(int index) 58 | { 59 | for (int k = 0; k < foldouts.Count; k++) 60 | { 61 | if (k != index) 62 | foldouts[k] = false; 63 | else 64 | foldouts[k] = true; 65 | } 66 | } 67 | 68 | } 69 | } -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Scripts/Utilities/FoldoutList.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4697a3cc5a2abfd489fe746ed2509cf4 3 | timeCreated: 1434935864 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Scripts/Utilities/Range.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections; 3 | using System; 4 | 5 | namespace PhysSound 6 | { 7 | [System.Serializable] 8 | public struct Range 9 | { 10 | /// 11 | /// The minimum value of the range. 12 | /// 13 | public float Min; 14 | /// 15 | /// The maximium value of the range. 16 | /// 17 | public float Max; 18 | 19 | public Range(float min, float max) 20 | { 21 | this.Min = min; 22 | this.Max = max; 23 | } 24 | 25 | /// 26 | /// Checks to see if the given value is within the range's min and max values. 27 | /// 28 | public bool isWithinRange(float f) 29 | { 30 | return (f >= Min && f <= Max); 31 | } 32 | 33 | /// 34 | /// Clamps the given value to be between the range's min and max values. 35 | /// 36 | public float Clamp(float f) 37 | { 38 | return Mathf.Clamp(f, Min, Max); 39 | } 40 | 41 | /// 42 | /// Gets a random float value within the range. 43 | /// 44 | public float RandomInRange() 45 | { 46 | return UnityEngine.Random.Range(Min, Max); 47 | } 48 | 49 | /// 50 | /// Gets and random int value within the range. 51 | /// 52 | /// 53 | public int RandomInRangeInteger() 54 | { 55 | return (int)UnityEngine.Random.Range(Min, Max + 1); 56 | } 57 | 58 | /// 59 | /// Gets a value between min and max, specified by the variable t. 60 | /// 61 | public float Lerp(float t) 62 | { 63 | return Min + (Max - Min) * t; 64 | } 65 | 66 | /// 67 | /// Gets a value between 0 and 1 based on the given value, where 0 corresponds to Min and 1 corresponds to Max. 68 | /// 69 | public float Normalize(float val) 70 | { 71 | if (val <= Min) return 0; 72 | else if (val >= Max) return 1; 73 | 74 | return (val - Min) / (Max - Min); 75 | } 76 | } 77 | } -------------------------------------------------------------------------------- /PhysSound_2.6.0_Beta/Assets/PhysSound/Scripts/Utilities/Range.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 84968e40525482047959b1fe1d6b8950 3 | labels: 4 | - Physics 5 | - Sound 6 | - Audio 7 | - Impact 8 | timeCreated: 1431277561 9 | licenseType: Free 10 | MonoImporter: 11 | serializedVersion: 2 12 | defaultReferences: [] 13 | executionOrder: 0 14 | icon: {instanceID: 0} 15 | userData: 16 | assetBundleName: 17 | assetBundleVariant: 18 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # PhysSound Open Source 2 | [Here's the license](https://forum.unity.com/threads/open-source-physsound-physics-audio-system.334297/page-2#post-4399633) 3 | [Here's the download from the author](https://forum.unity.com/threads/open-source-physsound-physics-audio-system.334297/page-2#post-4399633) 4 | -------------------------------------------------------------------------------- /license.txt: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017-Present Kevin Somers 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. --------------------------------------------------------------------------------