Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 56 additions & 0 deletions Example/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{
"files.exclude":
{
"**/.DS_Store":true,
"**/.git":true,
"**/.gitignore":true,
"**/.gitmodules":true,
"**/*.booproj":true,
"**/*.pidb":true,
"**/*.suo":true,
"**/*.user":true,
"**/*.userprefs":true,
"**/*.unityproj":true,
"**/*.dll":true,
"**/*.exe":true,
"**/*.pdf":true,
"**/*.mid":true,
"**/*.midi":true,
"**/*.wav":true,
"**/*.gif":true,
"**/*.ico":true,
"**/*.jpg":true,
"**/*.jpeg":true,
"**/*.png":true,
"**/*.psd":true,
"**/*.tga":true,
"**/*.tif":true,
"**/*.tiff":true,
"**/*.3ds":true,
"**/*.3DS":true,
"**/*.fbx":true,
"**/*.FBX":true,
"**/*.lxo":true,
"**/*.LXO":true,
"**/*.ma":true,
"**/*.MA":true,
"**/*.obj":true,
"**/*.OBJ":true,
"**/*.asset":true,
"**/*.cubemap":true,
"**/*.flare":true,
"**/*.mat":true,
"**/*.meta":true,
"**/*.prefab":true,
"**/*.unity":true,
"build/":true,
"Build/":true,
"Library/":true,
"library/":true,
"obj/":true,
"Obj/":true,
"ProjectSettings/":true,
"temp/":true,
"Temp/":true
}
}
2 changes: 1 addition & 1 deletion Example/Assets/Example.mm
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
//

#import <Foundation/Foundation.h>
#import "unityswift-Swift.h"
#import <UnityFramework/UnityFramework-Swift.h>

extern "C" {
void _ex_callSwiftMethod(const char *message) {
Expand Down
29 changes: 25 additions & 4 deletions Example/Assets/Example.mm.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 7 additions & 3 deletions Example/Assets/Example.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,17 @@

import Foundation

class Example : NSObject {
public class Example : NSObject {
static func callUnityMethod(_ message: String) {
let uf = UnityFramework.getInstance()
// Call a method on a specified GameObject.
UnitySendMessage("CallbackTarget", "OnCallFromSwift", message)
uf?.sendMessageToGO(
withName: "CallbackTarget",
functionName: "OnCallFromSwift",
message: message)
}

static func swiftMethod(_ message: String) {
@objc public static func swiftMethod(_ message: String) {
print("\(#function) is called with message: \(message)")

self.callUnityMethod("Hello, Unity!")
Expand Down
29 changes: 25 additions & 4 deletions Example/Assets/Example.swift.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 0 additions & 9 deletions Example/Assets/UnitySwift.meta

This file was deleted.

9 changes: 0 additions & 9 deletions Example/Assets/UnitySwift/Editor.meta

This file was deleted.

34 changes: 0 additions & 34 deletions Example/Assets/UnitySwift/Editor/PostProcessor.cs

This file was deleted.

12 changes: 0 additions & 12 deletions Example/Assets/UnitySwift/Editor/PostProcessor.cs.meta

This file was deleted.

7 changes: 0 additions & 7 deletions Example/Assets/UnitySwift/UnitySwift-Bridging-Header.h

This file was deleted.

55 changes: 0 additions & 55 deletions Example/Assets/UnitySwift/UnitySwift-Bridging-Header.h.meta

This file was deleted.

60 changes: 60 additions & 0 deletions Example/Logs/Packages-Update.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@

=== Sat Sep 7 16:56:42 2019

Packages were changed.
Update Mode: resetToDefaultDependencies

The following packages were added:
com.unity.textmeshpro@2.0.1
com.unity.package-manager-ui@2.2.0
com.unity.collab-proxy@1.2.16
com.unity.ext.nunit@1.0.0
com.unity.test-framework@1.0.13
com.unity.timeline@1.1.0
com.unity.ide.vscode@1.0.7
com.unity.ide.rider@1.0.8
com.unity.ugui@1.0.0
com.unity.modules.ai@1.0.0
com.unity.modules.animation@1.0.0
com.unity.modules.androidjni@1.0.0
com.unity.modules.assetbundle@1.0.0
com.unity.modules.audio@1.0.0
com.unity.modules.cloth@1.0.0
com.unity.modules.director@1.0.0
com.unity.modules.imageconversion@1.0.0
com.unity.modules.imgui@1.0.0
com.unity.modules.jsonserialize@1.0.0
com.unity.modules.particlesystem@1.0.0
com.unity.modules.physics@1.0.0
com.unity.modules.physics2d@1.0.0
com.unity.modules.screencapture@1.0.0
com.unity.modules.terrain@1.0.0
com.unity.modules.terrainphysics@1.0.0
com.unity.modules.tilemap@1.0.0
com.unity.modules.ui@1.0.0
com.unity.modules.uielements@1.0.0
com.unity.modules.umbra@1.0.0
com.unity.modules.unityanalytics@1.0.0
com.unity.modules.unitywebrequest@1.0.0
com.unity.modules.unitywebrequestassetbundle@1.0.0
com.unity.modules.unitywebrequestaudio@1.0.0
com.unity.modules.unitywebrequesttexture@1.0.0
com.unity.modules.unitywebrequestwww@1.0.0
com.unity.modules.vehicles@1.0.0
com.unity.modules.video@1.0.0
com.unity.modules.vr@1.0.0
com.unity.modules.wind@1.0.0
com.unity.modules.xr@1.0.0

=== Wed Jul 22 15:40:25 2020

Packages were changed.
Update Mode: updateDependencies

The following packages were updated:
com.unity.ide.rider from version 1.0.8 to 1.1.4
com.unity.ide.vscode from version 1.0.7 to 1.2.1
com.unity.test-framework from version 1.0.13 to 1.1.14
com.unity.timeline from version 1.1.0 to 1.2.6
The following packages were removed:
com.unity.package-manager-ui@2.2.0
Loading