Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

Gameinstance cast fails

Hey all,

Do I need to instantiate the game instance somewhere before I access it? I am getting a cast fail.

The below image is in the level blueprint event graph.

Within my gameinstance (called B_Gameinstance), there is nothing in the event graph, or construction script. I have a public variable setup in the game instance blueprint. I try to access the game instance by getting game instance, then casting to the game instance blueprint. That is the point at which it fails.

My first thought is that maybe I need to instantiate the game instance in a more root location like game mode or something like that, but there is no documentation to guide me on this.

alt text

Product Version: Not Selected
more ▼

asked Sep 14 '14 at 05:39 PM in Blueprint Scripting

avatar image

18 2 3 7

avatar image phooddaniel Sep 14 '14 at 09:22 PM

That was it, eX1! Thank you very much. You made my day!

avatar image eXi Sep 14 '14 at 09:24 PM

Np, please mark the question as solved by clicking the "check" mark at the left side. (:

EDIT: I converted my comment to an answer. Now it should have the check mark.

avatar image phil123456789 Dec 19 '17 at 06:08 PM

still cant cast event when added to the game mode settings

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

I can't look into the Editor right now, but i have in mind that you need to set the GameInstance Class inside the project settings at the button of the Modes tab. Just like the Player Character etc. If i'm right, have you done this?

more ▼

answered Sep 14 '14 at 06:40 PM

avatar image

6.8k 332 184 467

avatar image Bardaf01 Mar 05 '17 at 09:27 PM

Haha ! Thanks a lot eXi ! This was my mistake too !

avatar image Rabble Rabble Nov 30 '17 at 01:43 AM

Thanks a bunch.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question