x

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"

build.cs target.cs documentation reference

Hi all. This is a question that I suppose everybody that starts with this will be questioning themselves.

  • What language is build.cs written in, so that we can search for documentation? (is it c#?)

  • When I move code that works on the "target.cs" file, to a plugin "build.cs" file, many variables stop working. Why?

While both files are .cs files and include barely nothing else, why do they use different variables, and what do we search for to get help?

Examples:

  • Console.Log to print now should be something like Log.TraceInformation. This works. Why? . I searched Console.WriteLine and it's a C# function, but it doesn't work here.

  • Path.GetFullPath, Path.Combine... to get paths... now doesn't work. Path doesn't exist. I read DirectoryReference.GetCurrentDirectory() should be used to get the current path, for example. But it doesn't work either.

Product Version: UE 4.18
Tags:
more ▼

asked Jan 16 '18 at 07:36 PM in C++ Programming

avatar image

darkgaze
179 6 13 17

avatar image darkgaze Jan 16 '18 at 07:39 PM

Found one of the answers: https://docs.unrealengine.com/latest/INT/Programming/UnrealBuildSystem/ModuleFiles/

build.cs is written in C# as I was expecting. But I still don't get why I can't use stuff that I was using in the Target.cs file.

avatar image darkgaze Jan 16 '18 at 07:51 PM

I found another answer while learning in case somebody is interested:

To find documentation, search here: https://docs.microsoft.com/en-us/dotnet/api/?view=netframework-4.7
Seems like the difference was that I need to include System for Path and System.IO to use Console. To do this in C# add:

using System

using System.IO

A new question arises: Which version of c# is Unreal Engine 4.18 using?

(comments are locked)
10|2000 characters needed characters left

0 answers: sort voted first
Be the first one to answer this question
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