edited May 2016 in ORK Support
Hi,

I am creating a 2D side scroller and I am following the ORK Tutorials using my own assets.
I have completed Tutorial 01 - 03 - Adding the Player, using Option 2 Adding the event to the town scene, using my own scene and player.

For animating the player I am using Mecanim as described in the Unity Tutorial "2D Character Controllers" so the player has a Sprite Renderer, Animator, Rigidbody 2d, Box Collider 2D, Circle Collider 2d and a PlayerController script.
The player spawns at the spawn point and the animations work however, Unity generates the following errors:

Can't add component 'CharacterController' to Player(Clone) because it conflicts with the existing 'Rigidbody2D' derived component!
UnityEngine.GameObject:AddComponent()
ORKFramework.PlayerControlSettings:AddPlayerControl(GameObject)
ORKFramework.GameControlsSettings:AddPlayerComponents(Combatant)
ORKFramework.Combatant:set_GameObject(GameObject)
ORKFramework.Combatant:Spawn(Vector3, Boolean, Single, Boolean, Vector3)
ORKFramework.PlayerHandler:SpawnPlayer(Vector3, Boolean, Single, Boolean, Vector3)
ORKFramework.PlayerHandler:SpawnPlayer(Int32)
ORKFramework.Events.Steps.SpawnPlayerStep:Execute(BaseEvent)
ORKFramework.Events.GameEvent:ExecuteNextStep()
ORKFramework.Events.BaseEvent:StepFinished(Int32)
ORKFramework.Events.Steps.JoinActiveGroupStep:Execute(BaseEvent)
ORKFramework.Events.GameEvent:ExecuteNextStep()
ORKFramework.Events.BaseEvent:StartEvent()
ORKFramework.Events.GameEvent:StartEvent(IEventStarter, GameObject)
ORKFramework.Behaviours.<StartEvent2>d__27:MoveNext()
UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator)
ORKFramework.Behaviours.EventInteraction:StartEvent(GameObject)
ORKFramework.Behaviours.BaseInteraction:DoAutoStart()
ORKFramework.Behaviours.EventInteraction:CheckAutoStart()
ORKFramework.Behaviours.EventInteraction:Start()

And

NullReferenceException: Object reference not set to an instance of an object
ORKFramework.PlayerControlSettings.AddPlayerControl (UnityEngine.GameObject player)
ORKFramework.GameControlsSettings.AddPlayerComponents (ORKFramework.Combatant c)
ORKFramework.Combatant.set_GameObject (UnityEngine.GameObject value)
ORKFramework.Combatant.Spawn (Vector3 position, Boolean setRotation, Single yRotation, Boolean setScale, Vector3 scale)
ORKFramework.PlayerHandler.SpawnPlayer (Vector3 position, Boolean setRotation, Single yRotation, Boolean setScale, Vector3 scale)
ORKFramework.PlayerHandler.SpawnPlayer (Int32 spawnID)
ORKFramework.Events.Steps.SpawnPlayerStep.Execute (ORKFramework.Events.BaseEvent baseEvent)
ORKFramework.Events.GameEvent.ExecuteNextStep ()
ORKFramework.Events.BaseEvent.StepFinished (Int32 next)
ORKFramework.Events.Steps.JoinActiveGroupStep.Execute (ORKFramework.Events.BaseEvent baseEvent)
ORKFramework.Events.GameEvent.ExecuteNextStep ()
ORKFramework.Events.BaseEvent.StartEvent ()
ORKFramework.Events.GameEvent.StartEvent (IEventStarter s, UnityEngine.GameObject startingObject)
ORKFramework.Behaviours.EventInteraction+<StartEvent2>d__27.MoveNext ()
UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator)
ORKFramework.Behaviours.EventInteraction:StartEvent(GameObject)
ORKFramework.Behaviours.BaseInteraction:DoAutoStart()
ORKFramework.Behaviours.EventInteraction:CheckAutoStart()
ORKFramework.Behaviours.EventInteraction:Start()


It looks as though the ORK Framework is trying to add another Character Controller to the Player when it is spawned. Please help point me in the right direction.

Thanks
Post edited by gatekeeper on
  • You'll need to use custom player controls with that setup - ORK's built-in controls are a bit limited and just to get you started. See this how-to for more details on how to let ORK know of your custom controls.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • Thanks GiL, that fixed it
Sign In or Register to comment.