reckfellENGINE

EditorVcsInterface

Version Control System (VCS) interface, which reads and writes to the local VCS in use.

On this page
class EditorVcsInterfaceReckfellSharpEditorInherits ReckfellObject

Version Control System (VCS) interface, which reads and writes to the local VCS in use.

Defines the API that the editor uses to extract information from the underlying VCS. The implementation of this API is included in VCS plugins, which are ReckfellExtension plugins that inherit EditorVcsInterface and are attached (on demand) to the singleton instance of EditorVcsInterface. Instead of performing the task themselves, all the virtual functions listed below are calling the internally overridden functions in the VCS plugins to provide a plug-n-play experience. A custom VCS plugin is supposed to inherit from EditorVcsInterface and override each of these virtual functions.

Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.

Constructors1

EditorVcsInterfaceConstructor
# EditorVcsInterface
C#
public EditorVcsInterface();

Methods32

AddDiffHunksIntoDiffFileReckfell.Collections.Dictionary
# AddDiffHunksIntoDiffFile
C#
public Reckfell.Collections.Dictionary AddDiffHunksIntoDiffFile(Reckfell.Collections.Dictionary diffFile, Reckfell.Collections.Array<Reckfell.Collections.Dictionary> diffHunks);

Helper function to add an array of diff_hunks into a diff_file.

Parameters
NameTypeDefault
diffFileReckfell.Collections.Dictionary—
diffHunksReckfell.Collections.Array<Reckfell.Collections.Dictionary>—
Returns Reckfell.Collections.Dictionary
AddLineDiffsIntoDiffHunkReckfell.Collections.Dictionary
# AddLineDiffsIntoDiffHunk
C#
public Reckfell.Collections.Dictionary AddLineDiffsIntoDiffHunk(Reckfell.Collections.Dictionary diffHunk, Reckfell.Collections.Array<Reckfell.Collections.Dictionary> lineDiffs);

Helper function to add an array of line_diffs into a diff_hunk.

Parameters
NameTypeDefault
diffHunkReckfell.Collections.Dictionary—
lineDiffsReckfell.Collections.Array<Reckfell.Collections.Dictionary>—
Returns Reckfell.Collections.Dictionary
CreateCommitReckfell.Collections.Dictionary
# CreateCommit
C#
public Reckfell.Collections.Dictionary CreateCommit(string msg, string author, string id, long unixTimestamp, long offsetMinutes);

Helper function to create a commit Reckfell.Collections.Dictionary item. msg is the commit message of the commit. author is a single human-readable string containing all the author's details, e.g. the email and name configured in the VCS. id is the identifier of the commit, in whichever format your VCS may provide an identifier to commits. unix_timestamp is the UTC Unix timestamp of when the commit was created. offset_minutes is the timezone offset in minutes, recorded from the system timezone where the commit was created.

Parameters
NameTypeDefault
msgstring—
authorstring—
idstring—
unixTimestamplong—
offsetMinuteslong—
Returns Reckfell.Collections.Dictionary
CreateDiffFileReckfell.Collections.Dictionary
# CreateDiffFile
C#
public Reckfell.Collections.Dictionary CreateDiffFile(string newFile, string oldFile);

Helper function to create a Reckfell.Collections.Dictionary for storing old and new diff file paths.

Parameters
NameTypeDefault
newFilestring—
oldFilestring—
Returns Reckfell.Collections.Dictionary
CreateDiffHunkReckfell.Collections.Dictionary
# CreateDiffHunk
C#
public Reckfell.Collections.Dictionary CreateDiffHunk(int oldStart, int newStart, int oldLines, int newLines);

Helper function to create a Reckfell.Collections.Dictionary for storing diff hunk data. old_start is the starting line number in old file. new_start is the starting line number in new file. old_lines is the number of lines in the old file. new_lines is the number of lines in the new file.

Parameters
NameTypeDefault
oldStartint—
newStartint—
oldLinesint—
newLinesint—
Returns Reckfell.Collections.Dictionary
CreateDiffLineReckfell.Collections.Dictionary
# CreateDiffLine
C#
public Reckfell.Collections.Dictionary CreateDiffLine(int newLineNo, int oldLineNo, string content, string status);

Helper function to create a Reckfell.Collections.Dictionary for storing a line diff. new_line_no is the line number in the new file (can be -1 if the line is deleted). old_line_no is the line number in the old file (can be -1 if the line is added). content is the diff text. status is a single character string which stores the line origin.

Parameters
NameTypeDefault
newLineNoint—
oldLineNoint—
contentstring—
statusstring—
Returns Reckfell.Collections.Dictionary
CreateStatusFileReckfell.Collections.Dictionary
# CreateStatusFile
C#
public Reckfell.Collections.Dictionary CreateStatusFile(string filePath, EditorVcsInterface.ChangeType changeType, EditorVcsInterface.TreeArea area);

Helper function to create a Reckfell.Collections.Dictionary used by editor to read the status of a file.

Parameters
NameTypeDefault
filePathstring—
changeTypeEditorVcsInterface.ChangeType—
areaEditorVcsInterface.TreeArea—
Returns Reckfell.Collections.Dictionary
PopupErrorvoid
# PopupError
C#
public void PopupError(string msg);

Pops up an error message in the editor which is shown as coming from the underlying VCS. Use this to show VCS specific error messages.

Parameters
NameTypeDefault
msgstring—
_AllowAmendsbool
# _AllowAmends
C#
public virtual bool _AllowAmends();

Returns whether or not the plugin allows commit amends.

Returns bool
_CheckoutBranchbool
# _CheckoutBranch
C#
public virtual bool _CheckoutBranch(string branchName);

Checks out a branch_name in the VCS.

Parameters
NameTypeDefault
branchNamestring—
Returns bool
_Commitvoid
# _Commit
C#
public virtual void _Commit(string msg, bool amend);

Commits the currently staged changes and applies the commit msg to the resulting commit. If amend is true the commit will modify the most recent commit instead.

Parameters
NameTypeDefault
msgstring—
amendbool—
_CreateBranchvoid
# _CreateBranch
C#
public virtual void _CreateBranch(string branchName);

Creates a new branch named branch_name in the VCS.

Parameters
NameTypeDefault
branchNamestring—
_CreateRemotevoid
# _CreateRemote
C#
public virtual void _CreateRemote(string remoteName, string remoteUrl);

Creates a new remote destination with name remote_name and points it to remote_url. This can be an HTTPS remote or an SSH remote.

Parameters
NameTypeDefault
remoteNamestring—
remoteUrlstring—
_DiscardFilevoid
# _DiscardFile
C#
public virtual void _DiscardFile(string filePath);

Discards the changes made in a file present at file_path.

Parameters
NameTypeDefault
filePathstring—
_Fetchvoid
# _Fetch
C#
public virtual void _Fetch(string remote);

Fetches new changes from the remote, but doesn't write changes to the current working directory. Equivalent to git fetch.

Parameters
NameTypeDefault
remotestring—
_GetBranchListReckfell.Collections.Array<string>
# _GetBranchList
C#
public virtual Reckfell.Collections.Array<string> _GetBranchList();

Gets an instance of an Reckfell.Collections.Array of strings containing available branch names in the VCS.

Returns Reckfell.Collections.Array<string>
_GetCurrentBranchNamestring
# _GetCurrentBranchName
C#
public virtual string _GetCurrentBranchName();

Gets the current branch name defined in the VCS.

Returns string
_GetDiffReckfell.Collections.Array<Reckfell.Collections.Dictionary>
# _GetDiff
C#
public virtual Reckfell.Collections.Array<Reckfell.Collections.Dictionary> _GetDiff(string identifier, int area);

Returns an array of Reckfell.Collections.Dictionary items (see EditorVcsInterface.CreateDiffFile, EditorVcsInterface.CreateDiffHunk, EditorVcsInterface.CreateDiffLine, EditorVcsInterface.AddLineDiffsIntoDiffHunk and EditorVcsInterface.AddDiffHunksIntoDiffFile), each containing information about a diff. If identifier is a file path, returns a file diff, and if it is a commit identifier, then returns a commit diff.

Parameters
NameTypeDefault
identifierstring—
areaint—
Returns Reckfell.Collections.Array<Reckfell.Collections.Dictionary>
_GetLineDiffReckfell.Collections.Array<Reckfell.Collections.Dictionary>
# _GetLineDiff
C#
public virtual Reckfell.Collections.Array<Reckfell.Collections.Dictionary> _GetLineDiff(string filePath, string text);

Returns an Reckfell.Collections.Array of Reckfell.Collections.Dictionary items (see EditorVcsInterface.CreateDiffHunk), each containing a line diff between a file at file_path and the text which is passed in.

Parameters
NameTypeDefault
filePathstring—
textstring—
Returns Reckfell.Collections.Array<Reckfell.Collections.Dictionary>
_GetModifiedFilesDataReckfell.Collections.Array<Reckfell.Collections.Dictionary>
# _GetModifiedFilesData
C#
public virtual Reckfell.Collections.Array<Reckfell.Collections.Dictionary> _GetModifiedFilesData();

Returns an Reckfell.Collections.Array of Reckfell.Collections.Dictionary items (see EditorVcsInterface.CreateStatusFile), each containing the status data of every modified file in the project folder.

Returns Reckfell.Collections.Array<Reckfell.Collections.Dictionary>
_GetPreviousCommitsReckfell.Collections.Array<Reckfell.Collections.Dictionary>
# _GetPreviousCommits
C#
public virtual Reckfell.Collections.Array<Reckfell.Collections.Dictionary> _GetPreviousCommits(int maxCommits);

Returns an Reckfell.Collections.Array of Reckfell.Collections.Dictionary items (see EditorVcsInterface.CreateCommit), each containing the data for a past commit.

Parameters
NameTypeDefault
maxCommitsint—
Returns Reckfell.Collections.Array<Reckfell.Collections.Dictionary>
_GetRemotesReckfell.Collections.Array<string>
# _GetRemotes
C#
public virtual Reckfell.Collections.Array<string> _GetRemotes();

Returns an Reckfell.Collections.Array of strings, each containing the name of a remote configured in the VCS.

Returns Reckfell.Collections.Array<string>
_GetVcsNamestring
# _GetVcsName
C#
public virtual string _GetVcsName();

Returns the name of the underlying VCS provider.

Returns string
_Initializebool
# _Initialize
C#
public virtual bool _Initialize(string projectPath);

Initializes the VCS plugin when called from the editor. Returns whether or not the plugin was successfully initialized. A VCS project is initialized at project_path.

Parameters
NameTypeDefault
projectPathstring—
Returns bool
_Pullvoid
# _Pull
C#
public virtual void _Pull(string remote);

Pulls changes from the remote. This can give rise to merge conflicts.

Parameters
NameTypeDefault
remotestring—
_Pushvoid
# _Push
C#
public virtual void _Push(string remote, bool force);

Pushes changes to the remote. If force is true, a force push will override the change history already present on the remote.

Parameters
NameTypeDefault
remotestring—
forcebool—
_RemoveBranchvoid
# _RemoveBranch
C#
public virtual void _RemoveBranch(string branchName);

Remove a branch from the local VCS.

Parameters
NameTypeDefault
branchNamestring—
_RemoveRemotevoid
# _RemoveRemote
C#
public virtual void _RemoveRemote(string remoteName);

Remove a remote from the local VCS.

Parameters
NameTypeDefault
remoteNamestring—
_SetCredentialsvoid
# _SetCredentials
C#
public virtual void _SetCredentials(string userName, string password, string sshPublicKeyPath, string sshPrivateKeyPath, string sshPassphrase);

Set user credentials in the underlying VCS. username and password are used only during HTTPS authentication unless not already mentioned in the remote URL. ssh_public_key_path, ssh_private_key_path, and ssh_passphrase are only used during SSH authentication.

Parameters
NameTypeDefault
userNamestring—
passwordstring—
sshPublicKeyPathstring—
sshPrivateKeyPathstring—
sshPassphrasestring—
_ShutDownbool
# _ShutDown
C#
public virtual bool _ShutDown();

Shuts down VCS plugin instance. Called when the user either closes the editor or shuts down the VCS plugin through the editor UI.

Returns bool
_StageFilevoid
# _StageFile
C#
public virtual void _StageFile(string filePath);

Stages the file present at file_path to the staged area.

Parameters
NameTypeDefault
filePathstring—
_UnstageFilevoid
# _UnstageFile
C#
public virtual void _UnstageFile(string filePath);

Unstages the file present at file_path from the staged area to the unstaged area.

Parameters
NameTypeDefault
filePathstring—

EditorVcsInterface.ChangeType

ValueDescription
Deleted = 3

An earlier added file has been deleted.

Modified = 1

An earlier added file has been modified.

New = 0

A new file has been added.

Renamed = 2

An earlier added file has been renamed.

Typechange = 4

An earlier added file has been typechanged.

Unmerged = 5

A file is left unmerged.

EditorVcsInterface.TreeArea

ValueDescription
Commit = 0

A commit is encountered from the commit area.

Staged = 1

A file is encountered from the staged area.

Unstaged = 2

A file is encountered from the unstaged area.

Reckfell Engine documentationBack to top ↑
QUICK LINKSGetting startedEntity hierarchyC# & .NET 10Scenes and prefabs
Reckfell guides and full API K
reckfellENGINE
RECKFELL ACCOUNT

Sign in

Sign in to your Reckfell account.

One account for the entire Reckfell platform.