Skip to main content
InaCentaur
Inspiring
May 5, 2025
Question

sanity test, why isn't this console log printing?

import { PropTypes } from 'horizon/core';
import * as hz from 'horizon/core';
//import { Component, Entity, Player, Vec3, CodeBlockEvents } from 'horizon/core';

class Test extends hz.Component<typeof Test> {
  static propsDefinition = {
    destination: { type: PropTypes.Entity }, // The entity that represents the destination
    triggerEntity: { type: PropTypes.Entity }, // The entity that triggers the teleportation
  };

  start() {
    console.log("TeleportComponent TEST started");
 
   
  }
}
 

hz.Component.register(Test);

4 replies

SeeingBlue
Honored Contributor
May 5, 2025

I assume it is attached to an object in your world?

Upcoming Events : Performance Pro - UI Unleashed - Building Responsive & Performant Interfaces Thursday June 19th 5:00 PM PT - Register June Programming Calendar
InaCentaur
Inspiring
May 5, 2025

it is, of course! 

would there be anything that can prevent it from console logging when it is attached to an entity in hierarchy?? 

PigeonNo12
Honored Contributor
May 6, 2025

I tried it on my end, and it seems right. Is the simulation running in the world? 

Upcoming Events : Build with a Mentor: Custom UI Thursday 3/20 at 5:00 PM PT Register March calendar of all Mentor Workshops and Office Hours
InaCentaur
Inspiring
May 6, 2025

ridic, i fell asleep, restarted my computer, and it suddenly started to work.