//---------------------------------------------------------------------------------------
void USkookumScriptComponent::OnRegister()
  {
  Super::OnRegister();

  ms_registered_skookumscript_components.append(this);

  if (SkookumScript::is_flag_set(SkookumScript::Flag_evaluate) 
   && GetOwner()->GetWorld() == SkUEClassBindingHelper::get_world())
    {
    create_sk_instance();
    }
  }
//---------------------------------------------------------------------------------------
void USkookumScriptComponent::InitializeComponent()
  {
  Super::InitializeComponent();

  // Call SkookumScript constructor, but only if we are located inside the game world
  if (GetOwner()->GetWorld() == SkUEClassBindingHelper::get_world())
    {
    SK_ASSERTX(SkookumScript::is_flag_set(SkookumScript::Flag_evaluate), "SkookumScript must be in initialized state when InitializeComponent() is invoked.");
    create_sk_instance();
    m_instance_p->call_default_constructor();
    }
  }