Hi,
I just begin to work on Unity with babylon.js and I am trying follow the getting started guide.
I copied the code from the Getting Started Video but it is not working for me. Why, someone can i help me about this subject?
Here is the codes:
ts
/* Babylon Scene Controller Template */
module PROJECT {
export class SceneController extends BABYLON.MeshComponent {
public constructor(owner: BABYLON.AbstractMesh, scene: BABYLON.Scene, tick: boolean = true, propertyBag: any = {}) {
super(owner, scene, tick, propertyBag);
}
protected ready() :void {
// Scene execute when ready
}
protected start() :void {
// Start component function
let hello:string = this.getProperty("hello","Hello World");
console.log("Scene Controller Says: " + hello);
}
protected update() :void {
// Update render loop function
}
protected after() :void {
// After render loop function
}
protected destroy() :void {
// Destroy component function
}
}
}
cs
/* Babylon Editor Script Component (C# UnityScript) */
using System;
using UnityEditor;
using UnityEngine;
using Unity3D2Babylon;
namespace MyProject
{
public class SceneController : EditorScriptComponent
{
[Header("-Script Properties-")]
[BabylonProperty]
public string hello = "Hello World";
protected SceneController()
{
this.babylonClass = "PROJECT.SceneController";
}
}
}
And here is the error on chorme console:
babylon.js:16 BJS - [23:42:27]: Unable to load from scenes/SampleScene.babylon: Error in onSuccess callback