Show / Hide Table of Contents

Class ScriptHashing

Inheritance
System.Object
ScriptHashing
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: AssetRipper.Export.UnityProjects.Scripts
Assembly: AssetRipper.Export.UnityProjects.dll
Syntax
public static class ScriptHashing

Methods

| Improve this Doc View Source

CalculateAssemblyGuid(IMonoScript)

Compute a unique hash of an assembly name and use that as the Guid for the assembly.

Declaration
public static UnityGuid CalculateAssemblyGuid(IMonoScript script)
Parameters
Type Name Description
AssetRipper.SourceGenerated.Classes.ClassID_115.IMonoScript script
Returns
Type Description
UnityGuid
Remarks

This is for consistency. Assembly guid's are random when created in Unity.

| Improve this Doc View Source

CalculateAssemblyGuid(String)

Compute a unique hash of an assembly name and use that as the Guid for the assembly.

Declaration
public static UnityGuid CalculateAssemblyGuid(string assemblyName)
Parameters
Type Name Description
System.String assemblyName
Returns
Type Description
UnityGuid
Remarks

This is for consistency. Assembly guid's are random when created in Unity.

| Improve this Doc View Source

CalculateScriptFileID(IMonoScript)

Compute the FileID of a script inside a compiled assembly.

Declaration
public static int CalculateScriptFileID(IMonoScript script)
Parameters
Type Name Description
AssetRipper.SourceGenerated.Classes.ClassID_115.IMonoScript script
Returns
Type Description
System.Int32
Remarks

This replicates a Unity algorithm.

| Improve this Doc View Source

CalculateScriptFileID(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>)

Compute the FileID of a script inside a compiled assembly.

Declaration
public static int CalculateScriptFileID(ReadOnlySpan<byte> namespace, ReadOnlySpan<byte> name)
Parameters
Type Name Description
ReadOnlySpan<System.Byte> namespace

The namespace of the script encoded as UTF8.

ReadOnlySpan<System.Byte> name

The name of the script encoded as UTF8.

Returns
Type Description
System.Int32
Remarks

This replicates a Unity algorithm.

| Improve this Doc View Source

CalculateScriptFileID(String, String)

Compute the FileID of a script inside a compiled assembly.

Declaration
public static int CalculateScriptFileID(string namespace, string name)
Parameters
Type Name Description
System.String namespace

The namespace of the script.

System.String name

The name of the script.

Returns
Type Description
System.Int32
Remarks

This replicates a Unity algorithm.

| Improve this Doc View Source

CalculateScriptGuid(IMonoScript)

Compute a unique hash of a script and use that as the Guid for the script.

Declaration
public static UnityGuid CalculateScriptGuid(IMonoScript script)
Parameters
Type Name Description
AssetRipper.SourceGenerated.Classes.ClassID_115.IMonoScript script
Returns
Type Description
UnityGuid
Remarks

This is for consistency. Script guid's are random when created in Unity.

| Improve this Doc View Source

CalculateScriptGuid(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, ReadOnlySpan<Byte>)

Compute a unique hash of a script and use that as the Guid for the script.

Declaration
public static UnityGuid CalculateScriptGuid(ReadOnlySpan<byte> assemblyName, ReadOnlySpan<byte> namespace, ReadOnlySpan<byte> className)
Parameters
Type Name Description
ReadOnlySpan<System.Byte> assemblyName

The name of the assembly (without any file extension) encoded as UTF8.

ReadOnlySpan<System.Byte> namespace

The namespace of the script encoded as UTF8.

ReadOnlySpan<System.Byte> className

The name of the script encoded as UTF8.

Returns
Type Description
UnityGuid
Remarks

This is for consistency. Script guid's are random when created in Unity.

  • Improve this Doc
  • View Source
☀
☾
In This Article
Back to top
Generated by DocFX
☀
☾