Full Code of NoxWings/Cable-Component for AI

master 8415e8c7ce78 cached
35 files
15.8 KB
5.8k tokens
21 symbols
1 requests
Download .txt
Repository: NoxWings/Cable-Component
Branch: master
Commit: 8415e8c7ce78
Files: 35
Total size: 15.8 KB

Directory structure:
gitextract_2prq106o/

├── .gitignore
├── Assets/
│   ├── CableComponent/
│   │   ├── Material/
│   │   │   ├── CableMaterial.mat
│   │   │   ├── CableMaterial.mat.meta
│   │   │   ├── FloorMaterial.mat
│   │   │   └── FloorMaterial.mat.meta
│   │   ├── Material.meta
│   │   ├── README.md
│   │   ├── README.md.meta
│   │   ├── Scenes/
│   │   │   ├── TestScene.unity
│   │   │   └── TestScene.unity.meta
│   │   ├── Scenes.meta
│   │   ├── Scripts/
│   │   │   ├── CableComponent.cs
│   │   │   ├── CableComponent.cs.meta
│   │   │   ├── CableParticle.cs
│   │   │   └── CableParticle.cs.meta
│   │   └── Scripts.meta
│   └── CableComponent.meta
├── ProjectSettings/
│   ├── AudioManager.asset
│   ├── ClusterInputManager.asset
│   ├── DynamicsManager.asset
│   ├── EditorBuildSettings.asset
│   ├── EditorSettings.asset
│   ├── GraphicsSettings.asset
│   ├── InputManager.asset
│   ├── NavMeshAreas.asset
│   ├── NetworkManager.asset
│   ├── Physics2DSettings.asset
│   ├── ProjectSettings.asset
│   ├── ProjectVersion.txt
│   ├── QualitySettings.asset
│   ├── TagManager.asset
│   ├── TimeManager.asset
│   ├── UnityAdsSettings.asset
│   └── UnityConnectSettings.asset
└── README.md

================================================
FILE CONTENTS
================================================

================================================
FILE: .gitignore
================================================
# Created by https://www.gitignore.io/api/unity

### Unity ###
/[Ll]ibrary/
/[Tt]emp/
/[Oo]bj/
/[Bb]uild/
/[Bb]uilds/
/Assets/AssetStoreTools*

# Autogenerated VS/MD/Consulo solution and project files
ExportedObj/
.consulo/
*.csproj
*.unityproj
*.sln
*.suo
*.tmp
*.user
*.userprefs
*.pidb
*.booproj
*.svd


# Unity3D generated meta files
*.pidb.meta

# Unity3D Generated File On Crash Reports
sysinfo.txt

# Builds
*.apk
*.unitypackage



================================================
FILE: Assets/CableComponent/Material/CableMaterial.mat
================================================
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
  serializedVersion: 6
  m_ObjectHideFlags: 0
  m_PrefabParentObject: {fileID: 0}
  m_PrefabInternal: {fileID: 0}
  m_Name: CableMaterial
  m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
  m_ShaderKeywords: _EMISSION
  m_LightmapFlags: 1
  m_CustomRenderQueue: -1
  stringTagMap: {}
  m_SavedProperties:
    serializedVersion: 2
    m_TexEnvs:
    - first:
        name: _BumpMap
      second:
        m_Texture: {fileID: 0}
        m_Scale: {x: 1, y: 1}
        m_Offset: {x: 0, y: 0}
    - first:
        name: _DetailAlbedoMap
      second:
        m_Texture: {fileID: 0}
        m_Scale: {x: 1, y: 1}
        m_Offset: {x: 0, y: 0}
    - first:
        name: _DetailMask
      second:
        m_Texture: {fileID: 0}
        m_Scale: {x: 1, y: 1}
        m_Offset: {x: 0, y: 0}
    - first:
        name: _DetailNormalMap
      second:
        m_Texture: {fileID: 0}
        m_Scale: {x: 1, y: 1}
        m_Offset: {x: 0, y: 0}
    - first:
        name: _EmissionMap
      second:
        m_Texture: {fileID: 0}
        m_Scale: {x: 1, y: 1}
        m_Offset: {x: 0, y: 0}
    - first:
        name: _MainTex
      second:
        m_Texture: {fileID: 0}
        m_Scale: {x: 1, y: 1}
        m_Offset: {x: 0, y: 0}
    - first:
        name: _MetallicGlossMap
      second:
        m_Texture: {fileID: 0}
        m_Scale: {x: 1, y: 1}
        m_Offset: {x: 0, y: 0}
    - first:
        name: _OcclusionMap
      second:
        m_Texture: {fileID: 0}
        m_Scale: {x: 1, y: 1}
        m_Offset: {x: 0, y: 0}
    - first:
        name: _ParallaxMap
      second:
        m_Texture: {fileID: 0}
        m_Scale: {x: 1, y: 1}
        m_Offset: {x: 0, y: 0}
    m_Floats:
    - first:
        name: _BumpScale
      second: 1
    - first:
        name: _Cutoff
      second: 0.5
    - first:
        name: _DetailNormalMapScale
      second: 1
    - first:
        name: _DstBlend
      second: 0
    - first:
        name: _GlossMapScale
      second: 1
    - first:
        name: _Glossiness
      second: 0
    - first:
        name: _GlossyReflections
      second: 1
    - first:
        name: _Metallic
      second: 0
    - first:
        name: _Mode
      second: 0
    - first:
        name: _OcclusionStrength
      second: 1
    - first:
        name: _Parallax
      second: 0.02
    - first:
        name: _SmoothnessTextureChannel
      second: 0
    - first:
        name: _SpecularHighlights
      second: 1
    - first:
        name: _SrcBlend
      second: 1
    - first:
        name: _UVSec
      second: 0
    - first:
        name: _ZWrite
      second: 1
    m_Colors:
    - first:
        name: _Color
      second: {r: 0.20588237, g: 0.20588237, b: 0.20588237, a: 1}
    - first:
        name: _EmissionColor
      second: {r: 0, g: 0, b: 0, a: 1}


================================================
FILE: Assets/CableComponent/Material/CableMaterial.mat.meta
================================================
fileFormatVersion: 2
guid: e20a2186cc0884c4186cd848b087703e
timeCreated: 1444228819
licenseType: Free
NativeFormatImporter:
  userData: 
  assetBundleName: 
  assetBundleVariant: 


================================================
FILE: Assets/CableComponent/Material/FloorMaterial.mat
================================================
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
  serializedVersion: 6
  m_ObjectHideFlags: 0
  m_PrefabParentObject: {fileID: 0}
  m_PrefabInternal: {fileID: 0}
  m_Name: FloorMaterial
  m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
  m_ShaderKeywords: _EMISSION
  m_LightmapFlags: 1
  m_CustomRenderQueue: -1
  stringTagMap: {}
  m_SavedProperties:
    serializedVersion: 2
    m_TexEnvs:
    - first:
        name: _BumpMap
      second:
        m_Texture: {fileID: 0}
        m_Scale: {x: 1, y: 1}
        m_Offset: {x: 0, y: 0}
    - first:
        name: _DetailAlbedoMap
      second:
        m_Texture: {fileID: 0}
        m_Scale: {x: 1, y: 1}
        m_Offset: {x: 0, y: 0}
    - first:
        name: _DetailMask
      second:
        m_Texture: {fileID: 0}
        m_Scale: {x: 1, y: 1}
        m_Offset: {x: 0, y: 0}
    - first:
        name: _DetailNormalMap
      second:
        m_Texture: {fileID: 0}
        m_Scale: {x: 1, y: 1}
        m_Offset: {x: 0, y: 0}
    - first:
        name: _EmissionMap
      second:
        m_Texture: {fileID: 0}
        m_Scale: {x: 1, y: 1}
        m_Offset: {x: 0, y: 0}
    - first:
        name: _MainTex
      second:
        m_Texture: {fileID: 0}
        m_Scale: {x: 1, y: 1}
        m_Offset: {x: 0, y: 0}
    - first:
        name: _MetallicGlossMap
      second:
        m_Texture: {fileID: 0}
        m_Scale: {x: 1, y: 1}
        m_Offset: {x: 0, y: 0}
    - first:
        name: _OcclusionMap
      second:
        m_Texture: {fileID: 0}
        m_Scale: {x: 1, y: 1}
        m_Offset: {x: 0, y: 0}
    - first:
        name: _ParallaxMap
      second:
        m_Texture: {fileID: 0}
        m_Scale: {x: 1, y: 1}
        m_Offset: {x: 0, y: 0}
    m_Floats:
    - first:
        name: _BumpScale
      second: 1
    - first:
        name: _Cutoff
      second: 0.5
    - first:
        name: _DetailNormalMapScale
      second: 1
    - first:
        name: _DstBlend
      second: 0
    - first:
        name: _GlossMapScale
      second: 1
    - first:
        name: _Glossiness
      second: 0
    - first:
        name: _GlossyReflections
      second: 1
    - first:
        name: _Metallic
      second: 0
    - first:
        name: _Mode
      second: 0
    - first:
        name: _OcclusionStrength
      second: 1
    - first:
        name: _Parallax
      second: 0.02
    - first:
        name: _SmoothnessTextureChannel
      second: 0
    - first:
        name: _SpecularHighlights
      second: 1
    - first:
        name: _SrcBlend
      second: 1
    - first:
        name: _UVSec
      second: 0
    - first:
        name: _ZWrite
      second: 1
    m_Colors:
    - first:
        name: _Color
      second: {r: 0.29411763, g: 0.29411763, b: 0.29411763, a: 1}
    - first:
        name: _EmissionColor
      second: {r: 0, g: 0, b: 0, a: 1}


================================================
FILE: Assets/CableComponent/Material/FloorMaterial.mat.meta
================================================
fileFormatVersion: 2
guid: 7a2ff32d7b3cb31498d778f8a3b29e1a
timeCreated: 1478455142
licenseType: Free
NativeFormatImporter:
  userData: 
  assetBundleName: 
  assetBundleVariant: 


================================================
FILE: Assets/CableComponent/Material.meta
================================================
fileFormatVersion: 2
guid: 6d5cbb863b6bf034d94a7b4b35dcd644
folderAsset: yes
timeCreated: 1444228621
licenseType: Free
DefaultImporter:
  userData: 
  assetBundleName: 
  assetBundleVariant: 


================================================
FILE: Assets/CableComponent/README.md
================================================
# UnityCableComponent
"Cable Component" for Unity3D based on verlet integration just like in UE4.


================================================
FILE: Assets/CableComponent/README.md.meta
================================================
fileFormatVersion: 2
guid: 6b0a6c9ca9397e741af71e18838577a3
timeCreated: 1444252217
licenseType: Free
DefaultImporter:
  userData: 
  assetBundleName: 
  assetBundleVariant: 


================================================
FILE: Assets/CableComponent/Scenes/TestScene.unity.meta
================================================
fileFormatVersion: 2
guid: d01135766194e404088cea9fed636792
timeCreated: 1444229211
licenseType: Free
DefaultImporter:
  userData: 
  assetBundleName: 
  assetBundleVariant: 


================================================
FILE: Assets/CableComponent/Scenes.meta
================================================
fileFormatVersion: 2
guid: 5dd7385a29188264eb039571608a43e3
folderAsset: yes
timeCreated: 1444228613
licenseType: Free
DefaultImporter:
  userData: 
  assetBundleName: 
  assetBundleVariant: 


================================================
FILE: Assets/CableComponent/Scripts/CableComponent.cs
================================================
using UnityEngine;
using System;
using System.Collections;


public class CableComponent : MonoBehaviour
{
	#region Class members

	[SerializeField] private Transform endPoint;
	[SerializeField] private Material cableMaterial;

	// Cable config
	[SerializeField] private float cableLength = 0.5f;
	[SerializeField] private int totalSegments = 5;
	[SerializeField] private float segmentsPerUnit = 2f;
	private int segments = 0;
	[SerializeField] private float cableWidth = 0.1f;

	// Solver config
	[SerializeField] private int verletIterations = 1;
	[SerializeField] private int solverIterations = 1;

	//[Range(0,3)]
	[SerializeField] private float stiffness = 1f;

	private LineRenderer line;
	private CableParticle[] points;

	#endregion


	#region Initial setup

	void Start()
	{
		InitCableParticles();
		InitLineRenderer();
	}

	/**
	 * Init cable particles
	 * 
	 * Creates the cable particles along the cable length
	 * and binds the start and end tips to their respective game objects.
	 */
	void InitCableParticles()
	{
		// Calculate segments to use
		if (totalSegments > 0)
			segments = totalSegments;
		else
			segments = Mathf.CeilToInt (cableLength * segmentsPerUnit);

		Vector3 cableDirection = (endPoint.position - transform.position).normalized;
		float initialSegmentLength = cableLength / segments;
		points = new CableParticle[segments + 1];

		// Foreach point
		for (int pointIdx = 0; pointIdx <= segments; pointIdx++) {
			// Initial position
			Vector3 initialPosition = transform.position + (cableDirection * (initialSegmentLength * pointIdx));
			points[pointIdx] = new CableParticle(initialPosition);
		}

		// Bind start and end particles with their respective gameobjects
		CableParticle start = points[0];
		CableParticle end = points[segments];
		start.Bind(this.transform);
		end.Bind(endPoint.transform);
	}

	/**
	 * Initialized the line renderer
	 */
	void InitLineRenderer()
	{
		line = this.gameObject.AddComponent<LineRenderer>();
		line.SetWidth(cableWidth, cableWidth);
		line.SetVertexCount(segments + 1);
		line.material = cableMaterial;
		line.GetComponent<Renderer>().enabled = true;
	}

	#endregion


	#region Render Pass

	void Update()
	{
		RenderCable();
	}

	/**
	 * Render Cable
	 * 
	 * Update every particle position in the line renderer.
	 */
	void RenderCable()
	{
		for (int pointIdx = 0; pointIdx < segments + 1; pointIdx++) 
		{
			line.SetPosition(pointIdx, points [pointIdx].Position);
		}
	}

	#endregion


	#region Verlet integration & solver pass

	void FixedUpdate()
	{
		for (int verletIdx = 0; verletIdx < verletIterations; verletIdx++) 
		{
			VerletIntegrate();
			SolveConstraints();
		}
	}

	/**
	 * Verler integration pass
	 * 
	 * In this step every particle updates its position and speed.
	 */
	void VerletIntegrate()
	{
		Vector3 gravityDisplacement = Time.fixedDeltaTime * Time.fixedDeltaTime * Physics.gravity;
		foreach (CableParticle particle in points) 
		{
			particle.UpdateVerlet(gravityDisplacement);
		}
	}

	/**
	 * Constrains solver pass
	 * 
	 * In this step every constraint is addressed in sequence
	 */
	void SolveConstraints()
	{
		// For each solver iteration..
		for (int iterationIdx = 0; iterationIdx < solverIterations; iterationIdx++) 
		{
			SolveDistanceConstraint();
			SolveStiffnessConstraint();
		}
	}

	#endregion


	#region Solver Constraints

	/**
	 * Distance constraint for each segment / pair of particles
	 **/
	void SolveDistanceConstraint()
	{
		float segmentLength = cableLength / segments;
		for (int SegIdx = 0; SegIdx < segments; SegIdx++) 
		{
			CableParticle particleA = points[SegIdx];
			CableParticle particleB = points[SegIdx + 1];

			// Solve for this pair of particles
			SolveDistanceConstraint(particleA, particleB, segmentLength);
		}
	}
		
	/**
	 * Distance Constraint 
	 * 
	 * This is the main constrains that keeps the cable particles "tied" together.
	 */
	void SolveDistanceConstraint(CableParticle particleA, CableParticle particleB, float segmentLength)
	{
		// Find current vector between particles
		Vector3 delta = particleB.Position - particleA.Position;
		// 
		float currentDistance = delta.magnitude;
		float errorFactor = (currentDistance - segmentLength) / currentDistance;
		
		// Only move free particles to satisfy constraints
		if (particleA.IsFree() && particleB.IsFree()) 
		{
			particleA.Position += errorFactor * 0.5f * delta;
			particleB.Position -= errorFactor * 0.5f * delta;
		} 
		else if (particleA.IsFree()) 
		{
			particleA.Position += errorFactor * delta;
		} 
		else if (particleB.IsFree()) 
		{
			particleB.Position -= errorFactor * delta;
		}
	}

	/**
	 * Stiffness constraint
	 **/
	void SolveStiffnessConstraint()
	{
		float distance = (points[0].Position - points[segments].Position).magnitude;
		if (distance > cableLength) 
		{
			foreach (CableParticle particle in points) 
			{
				SolveStiffnessConstraint(particle, distance);
			}
		}	
	}

	/**
	 * TODO: I'll implement this constraint to reinforce cable stiffness 
	 * 
	 * As the system has more particles, the verlet integration aproach 
	 * may get way too loose cable simulation. This constraint is intended 
	 * to reinforce the cable stiffness.
	 * // throw new System.NotImplementedException ();
	 **/
	void SolveStiffnessConstraint(CableParticle cableParticle, float distance)
	{
	

	}

	#endregion
}


================================================
FILE: Assets/CableComponent/Scripts/CableComponent.cs.meta
================================================
fileFormatVersion: 2
guid: a262c1cd876da934d86e2a8ee0089db2
timeCreated: 1444228668
licenseType: Free
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData: 
  assetBundleName: 
  assetBundleVariant: 


================================================
FILE: Assets/CableComponent/Scripts/CableParticle.cs
================================================
using UnityEngine;
using System.Collections;

public class CableParticle
{
	#region Class member variables

	private Vector3 _position, _oldPosition;
	private Transform _boundTo = null;
	private Rigidbody _boundRigid = null;

	#endregion


	#region Properties

	public Vector3 Position {
		get { return _position; }
		set { _position = value; }
	}
		
	public Vector3 Velocity {
		get { return (_position - _oldPosition); }
	}

	#endregion


	#region Constructor

	public CableParticle(Vector3 newPosition)
	{
		_oldPosition = _position = newPosition;
	}

	#endregion


	#region Public functions

	public void UpdateVerlet(Vector3 gravityDisplacement)
	{
		if (this.IsBound())
		{
			if (_boundRigid == null) {
				this.UpdatePosition(_boundTo.position);		
			}
			else
			{
				switch (_boundRigid.interpolation) 
				{
				case RigidbodyInterpolation.Interpolate:
					this.UpdatePosition(_boundRigid.position + (_boundRigid.velocity * Time.fixedDeltaTime) / 2);
					break;
				case RigidbodyInterpolation.None:
				default:
					this.UpdatePosition(_boundRigid.position + _boundRigid.velocity * Time.fixedDeltaTime);
					break;
				}
			}
		}
		else 
		{
			Vector3 newPosition = this.Position + this.Velocity + gravityDisplacement;
			this.UpdatePosition(newPosition);
		}
	}

	public void UpdatePosition(Vector3 newPos) 
	{
		_oldPosition = _position;
		_position = newPos;
	}

	public void Bind(Transform to)
	{
		_boundTo = to;
		_boundRigid = to.GetComponent<Rigidbody>();
		_oldPosition = _position = _boundTo.position;
	}
		
	public void UnBind()
	{
		_boundTo = null;
		_boundRigid = null;
	}
		
	public bool IsFree()
	{
		return (_boundTo == null);
	}
		
	public bool IsBound()
	{
		return (_boundTo != null);
	}

	#endregion
}

================================================
FILE: Assets/CableComponent/Scripts/CableParticle.cs.meta
================================================
fileFormatVersion: 2
guid: c434c9bd6de363c46b5fae6ed070f2d2
timeCreated: 1444522184
licenseType: Free
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData: 
  assetBundleName: 
  assetBundleVariant: 


================================================
FILE: Assets/CableComponent/Scripts.meta
================================================
fileFormatVersion: 2
guid: dc842025b760e42469c4ef436fecd3c9
folderAsset: yes
timeCreated: 1444228637
licenseType: Free
DefaultImporter:
  userData: 
  assetBundleName: 
  assetBundleVariant: 


================================================
FILE: Assets/CableComponent.meta
================================================
fileFormatVersion: 2
guid: 6c878aafa9e93a146a8d53329313ea55
folderAsset: yes
timeCreated: 1444228571
licenseType: Free
DefaultImporter:
  userData: 
  assetBundleName: 
  assetBundleVariant: 


================================================
FILE: ProjectSettings/ProjectVersion.txt
================================================
m_EditorVersion: 5.4.0f3
m_StandardAssetsVersion: 0


================================================
FILE: README.md
================================================
# Cable-Component
Unity cable component implementation similar to the Unreal Engine one based on verlet integration.

This project is a simple and optimized implementation of cable physics in Unity3D, it uses verlet integration[1] to achieve the physics simulation just like UE4 approach[2].

The rendering part still has some work to be done as it is currently using a simple line renderer. Ideally it should use a procedural cable generation approach but it wasn't main the purpouse of this little experiment.


[![Cable Component Video](https://j.gifs.com/GZQ5gQ.gif)](https://www.youtube.com/watch?v=VN21ROvrF2k)


[1] https://en.wikipedia.org/wiki/Verlet_integration

[2] https://www.unrealengine.com/blog/cable-component-plugin-for-ue4
Download .txt
gitextract_2prq106o/

├── .gitignore
├── Assets/
│   ├── CableComponent/
│   │   ├── Material/
│   │   │   ├── CableMaterial.mat
│   │   │   ├── CableMaterial.mat.meta
│   │   │   ├── FloorMaterial.mat
│   │   │   └── FloorMaterial.mat.meta
│   │   ├── Material.meta
│   │   ├── README.md
│   │   ├── README.md.meta
│   │   ├── Scenes/
│   │   │   ├── TestScene.unity
│   │   │   └── TestScene.unity.meta
│   │   ├── Scenes.meta
│   │   ├── Scripts/
│   │   │   ├── CableComponent.cs
│   │   │   ├── CableComponent.cs.meta
│   │   │   ├── CableParticle.cs
│   │   │   └── CableParticle.cs.meta
│   │   └── Scripts.meta
│   └── CableComponent.meta
├── ProjectSettings/
│   ├── AudioManager.asset
│   ├── ClusterInputManager.asset
│   ├── DynamicsManager.asset
│   ├── EditorBuildSettings.asset
│   ├── EditorSettings.asset
│   ├── GraphicsSettings.asset
│   ├── InputManager.asset
│   ├── NavMeshAreas.asset
│   ├── NetworkManager.asset
│   ├── Physics2DSettings.asset
│   ├── ProjectSettings.asset
│   ├── ProjectVersion.txt
│   ├── QualitySettings.asset
│   ├── TagManager.asset
│   ├── TimeManager.asset
│   ├── UnityAdsSettings.asset
│   └── UnityConnectSettings.asset
└── README.md
Download .txt
SYMBOL INDEX (21 symbols across 2 files)

FILE: Assets/CableComponent/Scripts/CableComponent.cs
  class CableComponent (line 6) | public class CableComponent : MonoBehaviour
    method Start (line 35) | void Start()
    method InitCableParticles (line 47) | void InitCableParticles()
    method InitLineRenderer (line 76) | void InitLineRenderer()
    method Update (line 90) | void Update()
    method RenderCable (line 100) | void RenderCable()
    method FixedUpdate (line 113) | void FixedUpdate()
    method VerletIntegrate (line 127) | void VerletIntegrate()
    method SolveConstraints (line 141) | void SolveConstraints()
    method SolveDistanceConstraint (line 159) | void SolveDistanceConstraint()
    method SolveDistanceConstraint (line 177) | void SolveDistanceConstraint(CableParticle particleA, CableParticle pa...
    method SolveStiffnessConstraint (line 204) | void SolveStiffnessConstraint()
    method SolveStiffnessConstraint (line 224) | void SolveStiffnessConstraint(CableParticle cableParticle, float dista...

FILE: Assets/CableComponent/Scripts/CableParticle.cs
  class CableParticle (line 4) | public class CableParticle
    method CableParticle (line 31) | public CableParticle(Vector3 newPosition)
    method UpdateVerlet (line 41) | public void UpdateVerlet(Vector3 gravityDisplacement)
    method UpdatePosition (line 69) | public void UpdatePosition(Vector3 newPos)
    method Bind (line 75) | public void Bind(Transform to)
    method UnBind (line 82) | public void UnBind()
    method IsFree (line 88) | public bool IsFree()
    method IsBound (line 93) | public bool IsBound()
Condensed preview — 35 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (19K chars).
[
  {
    "path": ".gitignore",
    "chars": 437,
    "preview": "# Created by https://www.gitignore.io/api/unity\n\n### Unity ###\n/[Ll]ibrary/\n/[Tt]emp/\n/[Oo]bj/\n/[Bb]uild/\n/[Bb]uilds/\n/A"
  },
  {
    "path": "Assets/CableComponent/Material/CableMaterial.mat",
    "chars": 2873,
    "preview": "%YAML 1.1\n%TAG !u! tag:unity3d.com,2011:\n--- !u!21 &2100000\nMaterial:\n  serializedVersion: 6\n  m_ObjectHideFlags: 0\n  m_"
  },
  {
    "path": "Assets/CableComponent/Material/CableMaterial.mat.meta",
    "chars": 180,
    "preview": "fileFormatVersion: 2\nguid: e20a2186cc0884c4186cd848b087703e\ntimeCreated: 1444228819\nlicenseType: Free\nNativeFormatImport"
  },
  {
    "path": "Assets/CableComponent/Material/FloorMaterial.mat",
    "chars": 2873,
    "preview": "%YAML 1.1\n%TAG !u! tag:unity3d.com,2011:\n--- !u!21 &2100000\nMaterial:\n  serializedVersion: 6\n  m_ObjectHideFlags: 0\n  m_"
  },
  {
    "path": "Assets/CableComponent/Material/FloorMaterial.mat.meta",
    "chars": 180,
    "preview": "fileFormatVersion: 2\nguid: 7a2ff32d7b3cb31498d778f8a3b29e1a\ntimeCreated: 1478455142\nlicenseType: Free\nNativeFormatImport"
  },
  {
    "path": "Assets/CableComponent/Material.meta",
    "chars": 192,
    "preview": "fileFormatVersion: 2\nguid: 6d5cbb863b6bf034d94a7b4b35dcd644\nfolderAsset: yes\ntimeCreated: 1444228621\nlicenseType: Free\nD"
  },
  {
    "path": "Assets/CableComponent/README.md",
    "chars": 98,
    "preview": "# UnityCableComponent\n\"Cable Component\" for Unity3D based on verlet integration just like in UE4.\n"
  },
  {
    "path": "Assets/CableComponent/README.md.meta",
    "chars": 175,
    "preview": "fileFormatVersion: 2\nguid: 6b0a6c9ca9397e741af71e18838577a3\ntimeCreated: 1444252217\nlicenseType: Free\nDefaultImporter:\n "
  },
  {
    "path": "Assets/CableComponent/Scenes/TestScene.unity.meta",
    "chars": 175,
    "preview": "fileFormatVersion: 2\nguid: d01135766194e404088cea9fed636792\ntimeCreated: 1444229211\nlicenseType: Free\nDefaultImporter:\n "
  },
  {
    "path": "Assets/CableComponent/Scenes.meta",
    "chars": 192,
    "preview": "fileFormatVersion: 2\nguid: 5dd7385a29188264eb039571608a43e3\nfolderAsset: yes\ntimeCreated: 1444228613\nlicenseType: Free\nD"
  },
  {
    "path": "Assets/CableComponent/Scripts/CableComponent.cs",
    "chars": 5342,
    "preview": "using UnityEngine;\nusing System;\nusing System.Collections;\n\n\npublic class CableComponent : MonoBehaviour\n{\n\t#region Clas"
  },
  {
    "path": "Assets/CableComponent/Scripts/CableComponent.cs.meta",
    "chars": 263,
    "preview": "fileFormatVersion: 2\nguid: a262c1cd876da934d86e2a8ee0089db2\ntimeCreated: 1444228668\nlicenseType: Free\nMonoImporter:\n  se"
  },
  {
    "path": "Assets/CableComponent/Scripts/CableParticle.cs",
    "chars": 1741,
    "preview": "using UnityEngine;\nusing System.Collections;\n\npublic class CableParticle\n{\n\t#region Class member variables\n\n\tprivate Ve"
  },
  {
    "path": "Assets/CableComponent/Scripts/CableParticle.cs.meta",
    "chars": 263,
    "preview": "fileFormatVersion: 2\nguid: c434c9bd6de363c46b5fae6ed070f2d2\ntimeCreated: 1444522184\nlicenseType: Free\nMonoImporter:\n  se"
  },
  {
    "path": "Assets/CableComponent/Scripts.meta",
    "chars": 192,
    "preview": "fileFormatVersion: 2\nguid: dc842025b760e42469c4ef436fecd3c9\nfolderAsset: yes\ntimeCreated: 1444228637\nlicenseType: Free\nD"
  },
  {
    "path": "Assets/CableComponent.meta",
    "chars": 192,
    "preview": "fileFormatVersion: 2\nguid: 6c878aafa9e93a146a8d53329313ea55\nfolderAsset: yes\ntimeCreated: 1444228571\nlicenseType: Free\nD"
  },
  {
    "path": "ProjectSettings/ProjectVersion.txt",
    "chars": 52,
    "preview": "m_EditorVersion: 5.4.0f3\nm_StandardAssetsVersion: 0\n"
  },
  {
    "path": "README.md",
    "chars": 742,
    "preview": "# Cable-Component\nUnity cable component implementation similar to the Unreal Engine one based on verlet integration.\n\nTh"
  }
]

// ... and 17 more files (download for full content)

About this extraction

This page contains the full source code of the NoxWings/Cable-Component GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 35 files (15.8 KB), approximately 5.8k tokens, and a symbol index with 21 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!