Forum rules - please read before posting.

Default Camera/ Making the character movable with click

edited July 2015 in Technical Q&A

Hi,

After I have erased the default camera once, I cannot make new default camera from scene menu.

If I click it, just GameCamera2D is made.

Here is the message which comes together.  

NullReferenceException: Object reference not set to an instance of an object 

+ I cannot add new cameras at the ActionList Editor. ('drag and drop' does not work at all..)  


Also wondering how the character will move with clicking; now it only moves when the hot spot clicked.

Comments

  • If there's no default camera in your scene, you should be able to auto-create one at the top of the Scene Manager, by clicking "Create" beside "Default camera".  Otherwise, you can assign any pre-existing GameCamera2D in your scene by dragging it into that same field.

    Which Action are you trying to drag cameras onto?  If all else fails, you can try clicking the small circle to the right of the camera field, to bring up a list of available cameras to assign - rather than drag/dropping.

    You'll have to post the full error that appears in the Console window - the lines after that NullReferenceException will contain script data I'll need to analyse.

    To make a character move by pointing and clicking, you'll first have to make sure your "Movement method" within the Settings Manager is set to "Point And Click", and then create a NavMesh, which tells AC where the player can and can't move.  This tutorial covers the process.
  • Hi,

    If I click that Create button only GameCamera2D made, nothing happen to default camera.

    Drag/ dropping is not working for all camera option. There is no file if I click the small circle.  

    Here is the full error message.

    NullReferenceException: Object reference not set to an instance of an object
    AC.SceneManager.ShowGUI () (at Assets/AdventureCreator/Scripts/Managers/SceneManager.cs:144)
    AC.AdventureCreator.OnGUI () (at Assets/AdventureCreator/Scripts/Managers/Editor/AdventureCreator.cs:127)
    System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)


  • Well..I have set up as Point and Click when I made the asset. It works  but sometimes the character only moves when I click the hot spot. I have no idea why.

      

  • The only explanation I can give for the error message is that AC's asset package has not been fully imported - it's trying to find a prefab within the AdventureCreator folder that isn't there.  Re-importing the asset fully should solve this problem.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.