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"

Call to System.Environment.GetEnvironmentVariable in my *.Build.cs file not possible.

I have a test game project with a plugin. In my plugin build file, I'm calling System.Environment.GetEnvironmentVariable in order to reference a directory which is outside of the game project (not sure this is the right way too). It seems to properly expand the system vars when I check the NMAKE section of VisualStudio project, but does generate an exception when trying to build the project. Is the build tool executing this in some sort of sandboxed environment perhaps? Here's the build output:

 2>EXEC : error : Unable to instantiate instance of 'MyPlugin' object type from compiled assembly 'MyGameModuleRules, Version=, Culture=neutral, PublicKeyToken=null'.  Unreal Build Tool creates an instance of your module's 'Rules' object in order to find out about your module's requirements.  The CLR exception details may provide more information:  System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.ArgumentNullException: Value cannot be null.
 2>         Parameter name: path1
 2>            at System.IO.Path.Combine(String path1, String path2)
 2>            at UnrealBuildTool.Rules.MyPlugin..ctor(ReadOnlyTargetRules Target) in d:\UnrealProjects\MyGame\Plugins\MyPlugin\Source\MyPlugin\MyPlugin.Build.cs:line 38
 2>            --- End of inner exception stack trace ---
 2>            at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
 2>            at System.Reflection.RuntimeConstructorInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
 2>            at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
 2>            at UnrealBuildTool.RulesAssembly.CreateModuleRules(String ModuleName, ReadOnlyTargetRules Target, FileReference& ModuleFileName) in D:\UnrealEngine\Engine\Source\Programs\UnrealBuildTool\System\RulesAssembly.cs:line 299

Any suggestions?


Product Version: UE 4.17
more ▼

asked Aug 31 '17 at 03:18 PM in Everything Else

avatar image

1 1 1

(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