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"

if WITH_EDITORONLY_DATA how to access in game?

Is there any way to access data having if WITH_EDITORONLY_DATA in game.

I am writing a plugin which needs access to a data having the macro if WITH_EDITORONLY_DATA

Is it possible to access the data without changing the sourcecode? I need the data in game only to perform a test if the test is successful, I will start to look to implement the plugin in the game. And the game will do the calculation in the editor so, it wont be needing to perform those calculation while the game runs.

Product Version: Not Selected
more ▼

asked Sep 04 '14 at 07:56 AM in C++ Programming

avatar image

428 77 118 148

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

1 answer: sort voted first

As the name of the macro suggests, that code is only available in the Editor.

In general, you cannot access Editor functionality from a game. The only exception is if you run your Editor as the game, i.e. you launch a game that uses the Editor executable.

I would not recommend changing the source code. The intent of the macro is pretty clear, and trying to circumvent it will likely open a can of worms.

more ▼

answered Sep 04 '14 at 04:42 PM

avatar image envenger Sep 04 '14 at 06:42 PM

Actually I am creating a module for cascade. And I think cascade module do have have access to WITH_EDITORONLY_DATA if I am not wrong.

If they don't have access to them, then I need to edit the source code.

But before implementing the cascade module, I wanted to test the thing in a game. So if I add a cascade module, does it have access to WITH_EDITORONLY_DATA

avatar image gmpreussner STAFF Sep 04 '14 at 06:46 PM

If your module is used in a standalone game, then WITH_EDITORONLY_DATA will be 0.

If your module is used in the Editor, then WITH_EDITORONLY_DATA will be 1.

In short, if your plug-in is for the Editor, all is good. If your plug-in is for games, then it won't work. You cannot access Editor-only data in games. That's why it is called 'Editor only'. When you package your game, the Editor data will actually be removed from the cooked packages. There is no way to access it, because it is no longer there.

(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