Show / Hide Table of Contents

Class SourceControlHelpers

Editor source control common functionality.

Inheritance
System.Object
UObject
SourceControlHelpers
Inherited Members
UObject.TransientPackage
UObject.CastTo<T>(UObject)
UObject.CastTo(UObject, Type)
UObject.RemoveObject(UObject)
UObject.MakeObjectArrayField<T>(NativeArray*)
UObject.NotImplemented<T>()
UObject.Construct()
UObject.GetHashCode()
UObject.GetName()
UObject.ToString()
UObject.Name
UObject._None
UObject.None
UObject.ObjPointer
UObject.LoadObjectFromClass(Class, UObject, String, String, LoadFlags, PackageMap, Boolean)
UObject.LoadClass(Class, UObject, String, String, LoadFlags, PackageMap)
UObject.GetPropertyFor<T>(Name)
UObject.ExecuteUbergraph
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: UE4.SourceControl
Assembly: UE4DotNet.dll
Syntax
public class SourceControlHelpers : UObject
Remarks

@note Many of these source control methods use smart file strings which can be one of:

  • fully qualified path
  • relative path
  • long package name
  • asset path
  • export text path (often stored on clipboard)

For example:

  • D:\Epic\Dev-Ent\Projects\Python3rdBP\Content\Mannequin\Animations\ThirdPersonIdle.uasset
  • Content\Mannequin\Animations\ThirdPersonIdle.uasset
  • /Game/Mannequin/Animations/ThirdPersonIdle
  • /Game/Mannequin/Animations/ThirdPersonIdle.ThirdPersonIdle
  • AnimSequence'/Game/Mannequin/Animations/ThirdPersonIdle.ThirdPersonIdle'

Properties

| Improve this Doc View Source

DefaultObject

Get UE4 Default Object for this Class

Declaration
public static SourceControlHelpers DefaultObject { get; }
Property Value
Type Description
SourceControlHelpers
| Improve this Doc View Source

StaticClass

Get UE4 Class

Declaration
public static Class StaticClass { get; }
Property Value
Type Description
Class

Methods

| Improve this Doc View Source

CheckInFile(String, String, Boolean)

Use currently set source control provider to check in a file.

Declaration
public static bool CheckInFile(string InFile, string InDescription, bool bSilent)
Parameters
Type Name Description
System.String InFile
System.String InDescription
System.Boolean bSilent
Returns
Type Description
System.Boolean
Remarks

@note Blocks until action is complete.

@param InFile The file to check in - can be either fully qualified path, relative path, long package name, asset path or export text path (often stored on clipboard) @param InDescription Description for check in @param bSilent if false (default) then write out any error info to the Log. Any error text can be retrieved by LastErrorMsg() regardless. @return true if succeeded, false if failed and can call LastErrorMsg() for more info.

| Improve this Doc View Source

CheckInFiles(Byte, String, Boolean)

Use currently set source control provider to check in specified files.

Declaration
public static bool CheckInFiles(byte InFiles, string InDescription, bool bSilent)
Parameters
Type Name Description
System.Byte InFiles
System.String InDescription
System.Boolean bSilent
Returns
Type Description
System.Boolean
Remarks

@note Blocks until action is complete.

@param InFiles Files to check out - can be either fully qualified path, relative path, long package name, asset path or export text path (often stored on clipboard) @param InDescription Description for check in @param bSilent if false (default) then write out any error info to the Log. Any error text can be retrieved by LastErrorMsg() regardless. @return true if succeeded, false if failed and can call LastErrorMsg() for more info.

| Improve this Doc View Source

CheckOutFile(String, Boolean)

Use currently set source control provider to check out a file.

Declaration
public static bool CheckOutFile(string InFile, bool bSilent)
Parameters
Type Name Description
System.String InFile
System.Boolean bSilent
Returns
Type Description
System.Boolean
Remarks

@note Blocks until action is complete.

@param InFile The file to check out - can be either fully qualified path, relative path, long package name, asset path or export text path (often stored on clipboard) @param bSilent if false (default) then write out any error info to the Log. Any error text can be retrieved by LastErrorMsg() regardless. @return true if succeeded, false if failed and can call LastErrorMsg() for more info.

| Improve this Doc View Source

CheckOutFiles(Byte, Boolean)

Use currently set source control provider to check out specified files.

Declaration
public static bool CheckOutFiles(byte InFiles, bool bSilent)
Parameters
Type Name Description
System.Byte InFiles
System.Boolean bSilent
Returns
Type Description
System.Boolean
Remarks

@note Blocks until action is complete.

@param InFiles Files to check out - can be either fully qualified path, relative path, long package name, asset path or export text path (often stored on clipboard) @param bSilent if false (default) then write out any error info to the Log. Any error text can be retrieved by LastErrorMsg() regardless. @return true if succeeded, false if failed and can call LastErrorMsg() for more info.

| Improve this Doc View Source

CheckOutOrAddFile(String, Boolean)

Use currently set source control provider to check out file or mark it for add.

Declaration
public static bool CheckOutOrAddFile(string InFile, bool bSilent)
Parameters
Type Name Description
System.String InFile
System.Boolean bSilent
Returns
Type Description
System.Boolean
Remarks

@note Blocks until action is complete.

@param InFile The file to check out/add - can be either fully qualified path, relative path, long package name, asset path or export text path (often stored on clipboard) @param bSilent if false (default) then write out any error info to the Log. Any error text can be retrieved by LastErrorMsg() regardless. @return true if succeeded, false if failed and can call LastErrorMsg() for more info.

| Improve this Doc View Source

CopyFile(String, String, Boolean)

Use currently set source control provider to copy a file.

Declaration
public static bool CopyFile(string InSourceFile, string InDestFile, bool bSilent)
Parameters
Type Name Description
System.String InSourceFile
System.String InDestFile
System.Boolean bSilent
Returns
Type Description
System.Boolean
Remarks

@note Blocks until action is complete.

@param InSourceFile Source file string to copy from - can be either fully qualified path, relative path, long package name, asset path or export text path (often stored on clipboard) @param InDestFile Source file string to copy to - can be either fully qualified path, relative path, long package name, asset path or export text path (often stored on clipboard). If package, then uses same extension as source file. @param bSilent if false (default) then write out any error info to the Log. Any error text can be retrieved by LastErrorMsg() regardless. @return true if succeeded, false if failed and can call LastErrorMsg() for more info.

| Improve this Doc View Source

CurrentProvider()

Determine the name of the current source control provider.

Declaration
public static string CurrentProvider()
Returns
Type Description
System.String
Remarks

@return the name of the current source control provider. If one is not set then "None" is returned.

| Improve this Doc View Source

IsAvailable()

Quick check if currently set source control provider is enabled and available for use (server-based providers can use this to return whether the server is available or not) @

Declaration
public static bool IsAvailable()
Returns
Type Description
System.Boolean
Remarks

return true if source control is available, false if it is not

| Improve this Doc View Source

IsEnabled()

Determine if there is a source control system enabled @

Declaration
public static bool IsEnabled()
Returns
Type Description
System.Boolean
Remarks

return true if enabled, false if not

| Improve this Doc View Source

LastErrorMsg()

Get status text set by SourceControl system if an error occurs regardless whether bSilent is set or not.

Declaration
public static byte LastErrorMsg()
Returns
Type Description
System.Byte
Remarks

Only set if there was an error.

| Improve this Doc View Source

MarkFileForAdd(String, Boolean)

Use currently set source control provider to mark a file for add.

Declaration
public static bool MarkFileForAdd(string InFile, bool bSilent)
Parameters
Type Name Description
System.String InFile
System.Boolean bSilent
Returns
Type Description
System.Boolean
Remarks

Does nothing (and returns true) if the file is already under SC @note Blocks until action is complete.

@param InFile The file to add - can be either fully qualified path, relative path, long package name, asset path or export text path (often stored on clipboard) @param bSilent if false (default) then write out any error info to the Log. Any error text can be retrieved by LastErrorMsg() regardless. @return true if succeeded, false if failed and can call LastErrorMsg() for more info.

| Improve this Doc View Source

MarkFileForDelete(String, Boolean)

Use currently set source control provider to remove file from source control and delete the file.

Declaration
public static bool MarkFileForDelete(string InFile, bool bSilent)
Parameters
Type Name Description
System.String InFile
System.Boolean bSilent
Returns
Type Description
System.Boolean
Remarks

@note Blocks until action is complete.

@param InFile The file to delete - can be either fully qualified path, relative path, long package name, asset path or export text path (often stored on clipboard) @param bSilent if false (default) then write out any error info to the Log. Any error text can be retrieved by LastErrorMsg() regardless. @return true if succeeded, false if failed and can call LastErrorMsg() for more info.

| Improve this Doc View Source

MarkFilesForAdd(Byte, Boolean)

Use currently set source control provider to mark files for add.

Declaration
public static bool MarkFilesForAdd(byte InFiles, bool bSilent)
Parameters
Type Name Description
System.Byte InFiles
System.Boolean bSilent
Returns
Type Description
System.Boolean
Remarks

Does nothing (and returns true) for any file that is already under SC @note Blocks until action is complete.

@param InFiles Files to check out - can be either fully qualified path, relative path, long package name, asset path or export text path (often stored on clipboard) @param bSilent if false (default) then write out any error info to the Log. Any error text can be retrieved by LastErrorMsg() regardless. @return true if succeeded, false if failed and can call LastErrorMsg() for more info.

| Improve this Doc View Source

New(UObject, Name)

Spawn an object of this class

Declaration
public static SourceControlHelpers New(UObject obj = null, Name name = default(Name))
Parameters
Type Name Description
UObject obj
Name name
Returns
Type Description
SourceControlHelpers
| Improve this Doc View Source

QueryFileState(String, Boolean)

Use currently set source control provider to query a file's source control state.

Declaration
public static SourceControlState QueryFileState(string InFile, bool bSilent)
Parameters
Type Name Description
System.String InFile
System.Boolean bSilent
Returns
Type Description
SourceControlState
Remarks

@note Blocks until action is complete.

@param InFile The file to query - can be either fully qualified path, relative path, long package name, asset path or export text path (often stored on clipboard) @param bSilent if false (default) then write out any error info to the Log. Any error text can be retrieved by LastErrorMsg() regardless. @return Source control state - see USourceControlState. It will have bIsValid set to false if it could not have its values set.

| Improve this Doc View Source

RevertFile(String, Boolean)

Use currently set source control provider to revert a file regardless whether any changes will be lost or not.

Declaration
public static bool RevertFile(string InFile, bool bSilent)
Parameters
Type Name Description
System.String InFile
System.Boolean bSilent
Returns
Type Description
System.Boolean
Remarks

@note Blocks until action is complete.

@param InFile The file to revert - can be either fully qualified path, relative path, long package name, asset path or export text path (often stored on clipboard) @param bSilent if false (default) then write out any error info to the Log. Any error text can be retrieved by LastErrorMsg() regardless. @return true if succeeded, false if failed and can call LastErrorMsg() for more info.

| Improve this Doc View Source

RevertFiles(Byte, Boolean)

Use currently set source control provider to revert files regardless whether any changes will be lost or not.

Declaration
public static bool RevertFiles(byte InFiles, bool bSilent)
Parameters
Type Name Description
System.Byte InFiles
System.Boolean bSilent
Returns
Type Description
System.Boolean
Remarks

@note Blocks until action is complete.

@param InFiles Files to revert - can be either fully qualified path, relative path, long package name, asset path or export text path (often stored on clipboard) @param bSilent if false (default) then write out any error info to the Log. Any error text can be retrieved by LastErrorMsg() regardless. @return true if succeeded, false if failed and can call LastErrorMsg() for more info.

| Improve this Doc View Source

RevertUnchangedFile(String, Boolean)

Use currently set source control provider to revert a file provided no changes have been made.

Declaration
public static bool RevertUnchangedFile(string InFile, bool bSilent)
Parameters
Type Name Description
System.String InFile
System.Boolean bSilent
Returns
Type Description
System.Boolean
Remarks

@note Blocks until action is complete.

@param InFile File to check out - can be either fully qualified path, relative path, long package name, asset path or export text path (often stored on clipboard) @param bSilent if false (default) then write out any error info to the Log. Any error text can be retrieved by LastErrorMsg() regardless. @return true if succeeded, false if failed and can call LastErrorMsg() for more info.

| Improve this Doc View Source

RevertUnchangedFiles(Byte, Boolean)

Use currently set source control provider to revert files provided no changes have been made.

Declaration
public static bool RevertUnchangedFiles(byte InFiles, bool bSilent)
Parameters
Type Name Description
System.Byte InFiles
System.Boolean bSilent
Returns
Type Description
System.Boolean
Remarks

@note Blocks until action is complete.

@param InFiles Files to check out - can be either fully qualified path, relative path, long package name, asset path or export text path (often stored on clipboard) @param bSilent if false (default) then write out any error info to the Log. Any error text can be retrieved by LastErrorMsg() regardless. @return true if succeeded, false if failed and can call LastErrorMsg() for more info.

Operators

| Improve this Doc View Source

Implicit(IntPtr to SourceControlHelpers)

Convert from IntPtr to UObject

Declaration
public static implicit operator SourceControlHelpers(IntPtr p)
Parameters
Type Name Description
System.IntPtr p
Returns
Type Description
SourceControlHelpers
  • Improve this Doc
  • View Source
Back to top Generated by DocFX