hello there,
I am forced to convert a js script to c#, to have assets listed in the store, after Dec31…
Seems, a simple conversion on Convert unity javascript (unityscript) to C# does not work well - great
Can someone please explain, what´s wrong with the C# script-conversion?
With the old JS script, I was able to drag´n´drop terrians into “slots” on the inspector-window, to setup neighboring terrains.
At runtime, the script eliminates those ugly LOD seams (that are still present in the lates unity-version, congratz!) and it was ruinning fine.
With the converted C# script, I get no “slots” to drag the terrains into grrrr
What is going on with this? Is there some code-genius out there, that can help me out on this one?
I am more of an Artist, coding is not my domain…
the JS script:
#pragma strict
var terrainLeft : Terrain;
var terrainTop : Terrain;
var terrainRight : Terrain;
var terrainBottom : Terrain;
function Start()
{
var thisTerrain : Terrain = GetComponent(Terrain); thisTerrain.SetNeighbors( terrainLeft, terrainTop, terrainRight, terrainBottom);
}
the converted C#:
using UnityEngine;
using System.Collections;
public class TerrainStitcher : MonoBehaviour
{
Terrain terrainLeft;
Terrain terrainTop;
Terrain terrainRight;
Terrain terrainBottom;
void Start()
{
Terrain thisTerrain = GetComponent<Terrain>();
thisTerrain.SetNeighbors(terrainLeft, terrainTop, terrainRight, terrainBottom);
}
}
Kind Regards !