├── .gitignore ├── Assets ├── Editor.meta ├── Editor │ ├── LinePostProcessor.cs │ ├── LinePostProcessor.cs.meta │ ├── SaveLineMeshFile.cs │ └── SaveLineMeshFile.cs.meta ├── Meshes.meta ├── Meshes │ ├── Materials.meta │ ├── Materials │ │ ├── Lines.mat │ │ ├── Lines.mat.meta │ │ ├── No Name.mat │ │ └── No Name.mat.meta │ ├── birdy_body.FBX │ ├── birdy_body.FBX.meta │ ├── birdy_lines.txt │ └── birdy_lines.txt.meta ├── Scenes.meta ├── Scenes │ ├── Example.unity │ └── Example.unity.meta ├── Scripts.meta ├── Scripts │ ├── LineModel.cs │ └── LineModel.cs.meta ├── Shaders.meta ├── Shaders │ ├── UnlitColorVertexAlpha.shader │ ├── UnlitColorVertexAlpha.shader.meta │ ├── UnlitColorVertexAlphaNoCull.shader │ └── UnlitColorVertexAlphaNoCull.shader.meta ├── birdy_lines.asset ├── birdy_lines.asset.meta ├── birdy_lines_mdl.asset └── birdy_lines_mdl.asset.meta ├── LICENSE ├── ProjectSettings ├── AudioManager.asset ├── DynamicsManager.asset ├── EditorBuildSettings.asset ├── EditorSettings.asset ├── GraphicsSettings.asset ├── InputManager.asset ├── NavMeshLayers.asset ├── NetworkManager.asset ├── Physics2DSettings.asset ├── ProjectSettings.asset ├── QualitySettings.asset ├── TagManager.asset └── TimeManager.asset └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | Library/* 2 | Temp/* 3 | iOS-Build/* 4 | */DerivedData/* 5 | *.booproj 6 | *.csproj 7 | *.sln 8 | *.userprefs 9 | *.pidb 10 | *.unityproj 11 | .DS_Store 12 | *.xcuserstate 13 | *.xcuserdatad 14 | *.apk 15 | *.pbxuser 16 | *.app 17 | *.sublime-project* 18 | *.sublime* 19 | *.exe 20 | *_Data 21 | Fishjn/* 22 | -------------------------------------------------------------------------------- /Assets/Editor.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1f261fe981f5945cd904a9ed83e02cfd 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /Assets/Editor/LinePostProcessor.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Changes: 3 | -Double spaces are cleaned out 4 | -Creates the processed files in the same folder as the input file 5 | -Automatically names exported files "[Thing]_Lines" and "[Thing]_Mesh" 6 | */ 7 | 8 | using UnityEngine; 9 | using UnityEditor; 10 | using System.Collections; 11 | using System.Collections.Generic; 12 | using System.IO; 13 | 14 | public class LineProcessor : Editor 15 | { 16 | static List vertices; 17 | static List lineSegments; 18 | static string modelPath; 19 | static string modelName; 20 | 21 | [MenuItem( "Assets/Process Line File" )] 22 | static void ProcessFile( ) { 23 | 24 | Object[] textAssets = Selection.GetFiltered( typeof( TextAsset ), SelectionMode.Unfiltered ); 25 | 26 | foreach ( Object textAsset in textAssets ) { 27 | TextAsset objFile = (TextAsset)textAsset; 28 | modelPath = AssetDatabase.GetAssetPath(objFile); 29 | modelName = objFile.name; 30 | 31 | vertices = new List(); 32 | lineSegments = new List(); 33 | 34 | string text = objFile.text; 35 | string[] allLines = text.Split( '\n' ); 36 | for (int i = 0; i < allLines.Length; i++) 37 | { 38 | var line = allLines[i]; 39 | 40 | //Clean double spaces that some programs export for some reason 41 | line = line.Replace(" ", " "); 42 | 43 | //Parse verts 44 | if (line.StartsWith("v")) 45 | { 46 | string[] vertexLineSplit = line.Split(' '); 47 | Vector3 v = new Vector3(float.Parse(vertexLineSplit[1]), float.Parse(vertexLineSplit[2]), float.Parse(vertexLineSplit[3])); 48 | vertices.Add(v); 49 | } 50 | 51 | //Parse lines 52 | if (line.StartsWith("l")) 53 | { 54 | List lineSegment = new List(); 55 | 56 | string[] lineSplit = line.Split(' '); 57 | foreach (string l in lineSplit) 58 | { 59 | int index; 60 | if (int.TryParse(l, out index)) 61 | { 62 | lineSegment.Add(index); 63 | } 64 | } 65 | lineSegment.Add(int.MinValue); 66 | 67 | if (lineSegment.Count > 0) 68 | { 69 | lineSegments.AddRange(lineSegment); 70 | } 71 | } 72 | } 73 | 74 | SaveLineFile(); 75 | } 76 | } 77 | 78 | static void SaveLineFile() { 79 | LineModel lm = ScriptableObject.CreateInstance(); 80 | 81 | string assetPathAndName = AssetDatabase.GenerateUniqueAssetPath( 82 | Path.GetDirectoryName(modelPath) + "/" + modelName + "_Lines" + ".asset"); 83 | 84 | AssetDatabase.CreateAsset( lm, assetPathAndName ); 85 | 86 | AssetDatabase.StartAssetEditing(); 87 | lm.vertices = vertices.ToArray(); 88 | lm.lineSegments = lineSegments.ToArray(); 89 | AssetDatabase.StopAssetEditing(); 90 | 91 | EditorUtility.SetDirty( lm ); 92 | AssetDatabase.SaveAssets(); 93 | 94 | SaveMesh( lm ); 95 | } 96 | 97 | static void SaveMesh( LineModel lineModel ) { 98 | Mesh mesh = new Mesh(); 99 | 100 | if ( lineModel != null ) { 101 | List indexList = new List(); 102 | for ( int i = 0; i < lineModel.lineSegments.Length - 1; ++i ) { 103 | int index = lineModel.lineSegments[i]; 104 | int nextIndex = lineModel.lineSegments[i + 1]; 105 | 106 | if ( index != int.MinValue && nextIndex != int.MinValue ) { 107 | indexList.Add( index - 1 ); 108 | indexList.Add( nextIndex - 1 ); 109 | } 110 | } 111 | mesh.vertices = lineModel.vertices; 112 | mesh.SetIndices( indexList.ToArray(), MeshTopology.Lines, 0 ); 113 | Color[] colors = new Color[mesh.vertexCount]; 114 | for ( int i = 0; i < colors.Length; ++i ) { 115 | colors[i] = new Color( 1f, 1f, 1f, 1f ); 116 | } 117 | mesh.colors = colors; 118 | 119 | string meshPathAndName = AssetDatabase.GenerateUniqueAssetPath( 120 | Path.GetDirectoryName(modelPath) + "/" + modelName + "_Mesh" + ".asset"); 121 | 122 | AssetDatabase.CreateAsset(mesh, meshPathAndName); 123 | AssetDatabase.SaveAssets(); 124 | } 125 | } 126 | } -------------------------------------------------------------------------------- /Assets/Editor/LinePostProcessor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9c68259ddbff24d5fb35c071988f88e8 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/Editor/SaveLineMeshFile.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEditor; 3 | using System.Collections; 4 | using System.Collections.Generic; 5 | 6 | public class SaveLineMeshFile : Editor 7 | { 8 | static List vertices; 9 | static List lineSegments; 10 | 11 | [MenuItem ("CONTEXT/LineModelRenderer/Save Mesh")] 12 | static void SaveMeshFile( ) { 13 | GameObject go = Selection.activeGameObject; 14 | 15 | AssetDatabase.CreateAsset( go.GetComponent().mesh, "Assets/" + go.name + ".asset" ); 16 | AssetDatabase.SaveAssets(); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Assets/Editor/SaveLineMeshFile.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6453ce6cc223d45788ae53712f81e37e 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/Meshes.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4b98d0784976e40b6bdfb252bb242469 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /Assets/Meshes/Materials.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a04d960d62f4448eaa77fab95d89fbe1 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /Assets/Meshes/Materials/Lines.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bzgeb/UnityLineMeshes/e18b79a39c278a8ab64457e94df8c0837ad2ef36/Assets/Meshes/Materials/Lines.mat -------------------------------------------------------------------------------- /Assets/Meshes/Materials/Lines.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: dd485dc395c47405fb3758ead175f531 3 | NativeFormatImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/Meshes/Materials/No Name.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bzgeb/UnityLineMeshes/e18b79a39c278a8ab64457e94df8c0837ad2ef36/Assets/Meshes/Materials/No Name.mat -------------------------------------------------------------------------------- /Assets/Meshes/Materials/No Name.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 15c75d50532a146ab816b9454c11be17 3 | NativeFormatImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/Meshes/birdy_body.FBX: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bzgeb/UnityLineMeshes/e18b79a39c278a8ab64457e94df8c0837ad2ef36/Assets/Meshes/birdy_body.FBX -------------------------------------------------------------------------------- /Assets/Meshes/birdy_body.FBX.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ceb0c5fb46c8748cab18cc23490ed140 3 | ModelImporter: 4 | serializedVersion: 16 5 | fileIDToRecycleName: 6 | 100000: //RootNode 7 | 400000: //RootNode 8 | 2300000: //RootNode 9 | 3300000: //RootNode 10 | 4300000: birdy 11 | 9500000: //RootNode 12 | materials: 13 | importMaterials: 1 14 | materialName: 0 15 | materialSearch: 1 16 | animations: 17 | legacyGenerateAnimations: 4 18 | bakeSimulation: 0 19 | optimizeGameObjects: 0 20 | animationCompression: 1 21 | animationRotationError: .5 22 | animationPositionError: .5 23 | animationScaleError: .5 24 | animationWrapMode: 0 25 | extraExposedTransformPaths: [] 26 | clipAnimations: [] 27 | isReadable: 1 28 | meshes: 29 | lODScreenPercentages: [] 30 | globalScale: 1 31 | meshCompression: 0 32 | addColliders: 0 33 | importBlendShapes: 1 34 | swapUVChannels: 0 35 | generateSecondaryUV: 0 36 | useFileUnits: 1 37 | optimizeMeshForGPU: 1 38 | weldVertices: 1 39 | secondaryUVAngleDistortion: 8 40 | secondaryUVAreaDistortion: 15.000001 41 | secondaryUVHardAngle: 88 42 | secondaryUVPackMargin: 4 43 | tangentSpace: 44 | normalSmoothAngle: 60 45 | splitTangentsAcrossUV: 1 46 | normalImportMode: 0 47 | tangentImportMode: 1 48 | importAnimation: 1 49 | copyAvatar: 0 50 | humanDescription: 51 | human: [] 52 | skeleton: [] 53 | armTwist: .5 54 | foreArmTwist: .5 55 | upperLegTwist: .5 56 | legTwist: .5 57 | armStretch: .0500000007 58 | legStretch: .0500000007 59 | feetSpacing: 0 60 | rootMotionBoneName: 61 | lastHumanDescriptionAvatarSource: {instanceID: 0} 62 | animationType: 2 63 | additionalBone: 0 64 | userData: 65 | -------------------------------------------------------------------------------- /Assets/Meshes/birdy_lines.txt: -------------------------------------------------------------------------------- 1 | # 3ds Max Wavefront OBJ Exporter v0.97b - (c)2007 guruware 2 | # File Created: 08.11.2013 13:52:07 3 | 4 | # 5 | # shape birdy_lines 6 | # 7 | 8 | v 0.0327 -1.0527 3.3537 9 | v -0.0853 -0.6874 4.0314 10 | v -0.0696 -0.6333 4.6272 11 | v 0.0799 -1.0527 4.9271 12 | v 0.1429 -1.2169 4.5412 13 | v 0.0406 -1.0040 4.2903 14 | v 0.0248 -0.8700 4.5726 15 | v 0.0327 -1.0527 3.3537 16 | v 0.2525 -0.9833 3.7570 17 | v 0.2439 -1.1179 4.1623 18 | v 0.0327 -1.0527 3.3537 19 | v -0.2322 -0.9833 3.7913 20 | v -0.2708 -1.0811 4.0563 21 | v -0.2033 -1.0212 3.0614 22 | v -0.3254 -1.0527 3.2514 23 | v -0.2804 -1.0956 2.7293 24 | v -0.3362 -0.9099 2.8799 25 | v -0.2033 -1.0212 3.0614 26 | v -0.2053 -1.1385 2.8952 27 | v 0.2568 -0.9908 3.0260 28 | v 0.4073 -1.0191 3.2687 29 | v 0.3141 -1.0956 2.7560 30 | v 0.2620 -1.1385 2.8799 31 | v 0.2568 -0.9908 3.0260 32 | v 0.3732 -0.9133 2.9013 33 | v 0.4591 -0.4693 -0.4577 34 | v 0.7819 -0.9330 -0.8521 35 | v 0.4591 -0.4693 -0.4577 36 | v 0.5740 -0.9747 -0.7568 37 | v 0.4591 -0.4693 -0.4577 38 | v 0.8632 -0.7131 -0.7923 39 | v -0.4591 -0.4693 -0.4577 40 | v -0.7698 -0.9289 -0.8426 41 | v -0.4591 -0.4693 -0.4577 42 | v -0.8528 -0.7428 -0.7305 43 | v -0.4591 -0.4693 -0.4577 44 | v -0.5401 -0.9729 -0.7812 45 | v -0.7355 -0.3976 1.9868 46 | v -1.1800 -0.6590 1.0562 47 | v -1.3107 -0.0799 0.5309 48 | v -1.0015 0.6797 0.6310 49 | v -0.5661 0.8745 1.2076 50 | v -0.7571 0.3876 1.4923 51 | v -1.0215 0.0810 1.0693 52 | v 0.7028 -0.3976 1.9868 53 | v 1.1473 -0.6590 1.0562 54 | v 1.2780 -0.0799 0.5309 55 | v 0.9688 0.6797 0.6310 56 | v 0.5334 0.8745 1.2076 57 | v 0.7244 0.3876 1.4923 58 | v 0.9888 0.0810 1.0693 59 | # 51 vertices 60 | 61 | g birdy_lines 62 | l 1 2 3 4 5 6 7 63 | l 8 9 10 64 | l 11 12 13 65 | l 14 15 66 | l 16 17 18 19 16 67 | l 20 21 68 | l 22 23 24 25 22 69 | l 26 27 70 | l 28 29 71 | l 30 31 72 | l 32 33 73 | l 34 35 74 | l 36 37 75 | l 38 39 40 41 42 43 44 76 | l 45 46 47 48 49 50 51 77 | 78 | -------------------------------------------------------------------------------- /Assets/Meshes/birdy_lines.txt.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c93aeb9307f5e4dfba4d559ed1c56ec3 3 | TextScriptImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/Scenes.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c81627237c656431285148850347c129 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /Assets/Scenes/Example.unity: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bzgeb/UnityLineMeshes/e18b79a39c278a8ab64457e94df8c0837ad2ef36/Assets/Scenes/Example.unity -------------------------------------------------------------------------------- /Assets/Scenes/Example.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3cf3847b6d0fd465e9ff4a46d941b56a 3 | DefaultImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/Scripts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 89b288dbfa78d4caa8a83f3816c51ecb 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /Assets/Scripts/LineModel.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections; 3 | using System.Collections.Generic; 4 | 5 | public class LineModel : ScriptableObject 6 | { 7 | [SerializeField] 8 | public Vector3[] vertices; 9 | [SerializeField] 10 | public int[] lineSegments; 11 | } 12 | -------------------------------------------------------------------------------- /Assets/Scripts/LineModel.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 77494753c953142889c6fe261eccc063 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/Shaders.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1e377dc4d90574682832cfee61043aa6 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /Assets/Shaders/UnlitColorVertexAlpha.shader: -------------------------------------------------------------------------------- 1 | Shader "Custom/Unlit-Color-VertexAlpha" { 2 | Properties { 3 | _Color ("Color", Color) = (1,1,1,1) 4 | } 5 | SubShader { 6 | Tags { "Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent" } 7 | LOD 100 8 | ZWrite On 9 | Blend SrcAlpha OneMinusSrcAlpha 10 | 11 | Pass { 12 | Lighting Off 13 | CGPROGRAM 14 | #include "UnityCG.cginc" 15 | #pragma vertex vert 16 | #pragma fragment frag 17 | #pragma target 3.0 18 | 19 | float4 _Color; 20 | 21 | struct vertexInput { 22 | float4 vertex : POSITION; 23 | float4 color : COLOR; 24 | }; 25 | 26 | struct vertexOutput { 27 | float4 pos : SV_POSITION; 28 | float4 color : COLOR0; 29 | }; 30 | 31 | vertexOutput vert( vertexInput input ) { 32 | vertexOutput output; 33 | 34 | output.pos = mul( UNITY_MATRIX_MVP, input.vertex ); 35 | output.color = input.color; 36 | 37 | return output; 38 | } 39 | 40 | float4 frag( vertexOutput input ) : COLOR { 41 | float4 result = _Color; 42 | result.a *= input.color.a; 43 | 44 | return result; 45 | } 46 | ENDCG 47 | } 48 | } 49 | FallBack "Diffuse" 50 | } 51 | -------------------------------------------------------------------------------- /Assets/Shaders/UnlitColorVertexAlpha.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f1c4d8c1249a240c2af7df422834ce93 3 | ShaderImporter: 4 | defaultTextures: [] 5 | userData: 6 | -------------------------------------------------------------------------------- /Assets/Shaders/UnlitColorVertexAlphaNoCull.shader: -------------------------------------------------------------------------------- 1 | Shader "Custom/Unlit-Color-VertexAlpha-NoCull" { 2 | Properties { 3 | _Color ("Color", Color) = (1,1,1,1) 4 | } 5 | SubShader { 6 | Tags { "Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent" } 7 | LOD 100 8 | ZWrite On 9 | Blend SrcAlpha OneMinusSrcAlpha 10 | Cull Off 11 | 12 | Pass { 13 | Lighting Off 14 | CGPROGRAM 15 | #include "UnityCG.cginc" 16 | #pragma vertex vert 17 | #pragma fragment frag 18 | #pragma target 3.0 19 | 20 | float4 _Color; 21 | 22 | struct vertexInput { 23 | float4 vertex : POSITION; 24 | float4 color : COLOR; 25 | }; 26 | 27 | struct vertexOutput { 28 | float4 pos : SV_POSITION; 29 | float4 color : COLOR0; 30 | }; 31 | 32 | vertexOutput vert( vertexInput input ) { 33 | vertexOutput output; 34 | 35 | output.pos = mul( UNITY_MATRIX_MVP, input.vertex ); 36 | output.color = input.color; 37 | 38 | return output; 39 | } 40 | 41 | float4 frag( vertexOutput input ) : COLOR { 42 | float4 result = _Color; 43 | result.a *= input.color.a; 44 | 45 | return result; 46 | } 47 | ENDCG 48 | } 49 | } 50 | FallBack "Diffuse" 51 | } 52 | -------------------------------------------------------------------------------- /Assets/Shaders/UnlitColorVertexAlphaNoCull.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d7509bfe638994086ba39abd63f50ac0 3 | ShaderImporter: 4 | defaultTextures: [] 5 | userData: 6 | -------------------------------------------------------------------------------- /Assets/birdy_lines.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bzgeb/UnityLineMeshes/e18b79a39c278a8ab64457e94df8c0837ad2ef36/Assets/birdy_lines.asset -------------------------------------------------------------------------------- /Assets/birdy_lines.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a20e8dfa94c9e4c6d8702b6bb53bc5ee 3 | NativeFormatImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/birdy_lines_mdl.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bzgeb/UnityLineMeshes/e18b79a39c278a8ab64457e94df8c0837ad2ef36/Assets/birdy_lines_mdl.asset -------------------------------------------------------------------------------- /Assets/birdy_lines_mdl.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d1bd59981b11b41bc872a2b201212aab 3 | NativeFormatImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Bronson Zgeb 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. 22 | -------------------------------------------------------------------------------- /ProjectSettings/AudioManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bzgeb/UnityLineMeshes/e18b79a39c278a8ab64457e94df8c0837ad2ef36/ProjectSettings/AudioManager.asset -------------------------------------------------------------------------------- /ProjectSettings/DynamicsManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bzgeb/UnityLineMeshes/e18b79a39c278a8ab64457e94df8c0837ad2ef36/ProjectSettings/DynamicsManager.asset -------------------------------------------------------------------------------- /ProjectSettings/EditorBuildSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bzgeb/UnityLineMeshes/e18b79a39c278a8ab64457e94df8c0837ad2ef36/ProjectSettings/EditorBuildSettings.asset -------------------------------------------------------------------------------- /ProjectSettings/EditorSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bzgeb/UnityLineMeshes/e18b79a39c278a8ab64457e94df8c0837ad2ef36/ProjectSettings/EditorSettings.asset -------------------------------------------------------------------------------- /ProjectSettings/GraphicsSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bzgeb/UnityLineMeshes/e18b79a39c278a8ab64457e94df8c0837ad2ef36/ProjectSettings/GraphicsSettings.asset -------------------------------------------------------------------------------- /ProjectSettings/InputManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bzgeb/UnityLineMeshes/e18b79a39c278a8ab64457e94df8c0837ad2ef36/ProjectSettings/InputManager.asset -------------------------------------------------------------------------------- /ProjectSettings/NavMeshLayers.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bzgeb/UnityLineMeshes/e18b79a39c278a8ab64457e94df8c0837ad2ef36/ProjectSettings/NavMeshLayers.asset -------------------------------------------------------------------------------- /ProjectSettings/NetworkManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bzgeb/UnityLineMeshes/e18b79a39c278a8ab64457e94df8c0837ad2ef36/ProjectSettings/NetworkManager.asset -------------------------------------------------------------------------------- /ProjectSettings/Physics2DSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bzgeb/UnityLineMeshes/e18b79a39c278a8ab64457e94df8c0837ad2ef36/ProjectSettings/Physics2DSettings.asset -------------------------------------------------------------------------------- /ProjectSettings/ProjectSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bzgeb/UnityLineMeshes/e18b79a39c278a8ab64457e94df8c0837ad2ef36/ProjectSettings/ProjectSettings.asset -------------------------------------------------------------------------------- /ProjectSettings/QualitySettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bzgeb/UnityLineMeshes/e18b79a39c278a8ab64457e94df8c0837ad2ef36/ProjectSettings/QualitySettings.asset -------------------------------------------------------------------------------- /ProjectSettings/TagManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bzgeb/UnityLineMeshes/e18b79a39c278a8ab64457e94df8c0837ad2ef36/ProjectSettings/TagManager.asset -------------------------------------------------------------------------------- /ProjectSettings/TimeManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bzgeb/UnityLineMeshes/e18b79a39c278a8ab64457e94df8c0837ad2ef36/ProjectSettings/TimeManager.asset -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | UnityLineMeshes 2 | =============== 3 | 4 | Example of processing and using line meshes in Unity 5 | 6 | In order to use this: 7 | - Export a spline model to .obj 8 | - Change the extension from .obj to .txt 9 | - Add it to your unity project 10 | - Right-click the txt file in the Unity project view and select "Process Line File". This creates two files "NewLineMesh" and "NewLineModel". 11 | - Rename "NewLineMesh" to whatever you want and add it to a mesh filter. 12 | 13 | NOW YOU'RE DONE 14 | 15 | IT COULD LOOK LIKE THIS? 16 | 17 | 18 | [![ScreenShot](http://37.media.tumblr.com/287f2d8879e025961a6c676fe2402cd1/tumblr_mwmwgdiHzX1s5hzo1o2_500.gif)](http://37.media.tumblr.com/287f2d8879e025961a6c676fe2402cd1/tumblr_mwmwgdiHzX1s5hzo1o2_500.gif) 19 | 20 | 21 | OR THIS? 22 | 23 | [![ScreenShot](http://i.imgur.com/kGrlhxi.gif)](http://i.imgur.com/kGrlhxi.gif) 24 | 25 | (Courtesy of [@Magdvv](https://twitter.com/magdvv)) 26 | --------------------------------------------------------------------------------