Q:

How can I make an object solid using JavaScript?

I'm using Unity to make a video game, and I'm trying to make a code file that I can assign to my Assets to make them solid.
Here's my code so far:
using UnityEngine;

// Object Properties:

var density = 100%;

A:

Hey so var density = 100% is just declaring a new variable. You would need to actually select the object and modify its mesh.
UnityScript is the version of JavaScript Unity uses and you can find some documentation on creating and modifying meshes here: https://docs.unity3d.com/ScriptReference/Mesh.html
I believe UnityScript though is considered deprecated and you may want to move to Unity's C#.

